gitlab-glfm-markdown 0.0.37-x86_64-linux-musl → 0.0.38-x86_64-linux-musl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Cargo.lock +22 -109
- data/README.md +4 -5
- data/ext/glfm_markdown/Cargo.lock +22 -109
- data/ext/glfm_markdown/Cargo.toml +5 -5
- data/ext/glfm_markdown/src/formatter.rs +2 -2
- data/ext/glfm_markdown/src/glfm.rs +5 -4
- data/ext/glfm_markdown/src/lib.rs +5 -5
- data/ext/glfm_markdown/src/main.rs +3 -3
- data/lib/glfm_markdown/3.1/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/3.2/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/3.3/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/3.4/glfm_markdown.so +0 -0
- data/lib/glfm_markdown/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb976d469380a8511cbe3077279ea848f1374e2d8abd5c40310dc62b5af65402
|
|
4
|
+
data.tar.gz: becb048d6fa1553e2e63379f6fd999db49f951bfcd34f3122f0a1d215502d6c0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f99509b87536e27e698df82412a903e53108fa45e37598434a16a54536968563ed27adbdffbce6edbb2b79756f3d069ef8ef4109c65cd0bc87283a2416573ecb
|
|
7
|
+
data.tar.gz: 9d2291970a0e03ea2cfec11121e415654ee23f29d31b97cb28823d1944f93dc89b8b500e5df1b57c29836c33ceace97c0b106dce4a9f8cc943df1bc18a9f6d61
|
data/Cargo.lock
CHANGED
|
@@ -129,12 +129,6 @@ version = "2.9.1"
|
|
|
129
129
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
130
|
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
|
|
131
131
|
|
|
132
|
-
[[package]]
|
|
133
|
-
name = "bumpalo"
|
|
134
|
-
version = "3.19.0"
|
|
135
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
136
|
-
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
|
137
|
-
|
|
138
132
|
[[package]]
|
|
139
133
|
name = "caseless"
|
|
140
134
|
version = "0.2.2"
|
|
@@ -227,15 +221,14 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
|
227
221
|
|
|
228
222
|
[[package]]
|
|
229
223
|
name = "comrak"
|
|
230
|
-
version = "0.
|
|
224
|
+
version = "0.46.0"
|
|
231
225
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
-
checksum = "
|
|
226
|
+
checksum = "dc151d9c800c4fadd542c949b84c1dae6d1b424315ebcfd154e611d4f7910a97"
|
|
233
227
|
dependencies = [
|
|
234
228
|
"caseless",
|
|
235
229
|
"emojis",
|
|
236
230
|
"entities",
|
|
237
|
-
"
|
|
238
|
-
"slug",
|
|
231
|
+
"jetscii",
|
|
239
232
|
"syntect",
|
|
240
233
|
"typed-arena",
|
|
241
234
|
"unicode_categories",
|
|
@@ -259,12 +252,6 @@ dependencies = [
|
|
|
259
252
|
"powerfmt",
|
|
260
253
|
]
|
|
261
254
|
|
|
262
|
-
[[package]]
|
|
263
|
-
name = "deunicode"
|
|
264
|
-
version = "1.6.2"
|
|
265
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
266
|
-
checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04"
|
|
267
|
-
|
|
268
255
|
[[package]]
|
|
269
256
|
name = "either"
|
|
270
257
|
version = "1.15.0"
|
|
@@ -320,7 +307,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
320
307
|
|
|
321
308
|
[[package]]
|
|
322
309
|
name = "glfm_markdown"
|
|
323
|
-
version = "0.0.
|
|
310
|
+
version = "0.0.38"
|
|
324
311
|
dependencies = [
|
|
325
312
|
"clap",
|
|
326
313
|
"comrak",
|
|
@@ -381,6 +368,12 @@ version = "1.0.15"
|
|
|
381
368
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
382
369
|
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|
383
370
|
|
|
371
|
+
[[package]]
|
|
372
|
+
name = "jetscii"
|
|
373
|
+
version = "0.5.3"
|
|
374
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
375
|
+
checksum = "47f142fe24a9c9944451e8349de0a56af5f3e7226dc46f3ed4d4ecc0b85af75e"
|
|
376
|
+
|
|
384
377
|
[[package]]
|
|
385
378
|
name = "lazy_static"
|
|
386
379
|
version = "1.5.0"
|
|
@@ -415,17 +408,11 @@ version = "0.5.6"
|
|
|
415
408
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
416
409
|
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|
417
410
|
|
|
418
|
-
[[package]]
|
|
419
|
-
name = "log"
|
|
420
|
-
version = "0.4.27"
|
|
421
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
422
|
-
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
|
423
|
-
|
|
424
411
|
[[package]]
|
|
425
412
|
name = "magnus"
|
|
426
|
-
version = "0.
|
|
413
|
+
version = "0.8.2"
|
|
427
414
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
428
|
-
checksum = "
|
|
415
|
+
checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
|
|
429
416
|
dependencies = [
|
|
430
417
|
"magnus-macros",
|
|
431
418
|
"rb-sys",
|
|
@@ -435,9 +422,9 @@ dependencies = [
|
|
|
435
422
|
|
|
436
423
|
[[package]]
|
|
437
424
|
name = "magnus-macros"
|
|
438
|
-
version = "0.
|
|
425
|
+
version = "0.8.0"
|
|
439
426
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
440
|
-
checksum = "
|
|
427
|
+
checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
|
|
441
428
|
dependencies = [
|
|
442
429
|
"proc-macro2",
|
|
443
430
|
"quote",
|
|
@@ -587,18 +574,18 @@ dependencies = [
|
|
|
587
574
|
|
|
588
575
|
[[package]]
|
|
589
576
|
name = "rb-sys"
|
|
590
|
-
version = "0.9.
|
|
577
|
+
version = "0.9.117"
|
|
591
578
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
592
|
-
checksum = "
|
|
579
|
+
checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
|
|
593
580
|
dependencies = [
|
|
594
581
|
"rb-sys-build",
|
|
595
582
|
]
|
|
596
583
|
|
|
597
584
|
[[package]]
|
|
598
585
|
name = "rb-sys-build"
|
|
599
|
-
version = "0.9.
|
|
586
|
+
version = "0.9.117"
|
|
600
587
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
601
|
-
checksum = "
|
|
588
|
+
checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
|
|
602
589
|
dependencies = [
|
|
603
590
|
"bindgen",
|
|
604
591
|
"lazy_static",
|
|
@@ -611,9 +598,9 @@ dependencies = [
|
|
|
611
598
|
|
|
612
599
|
[[package]]
|
|
613
600
|
name = "rb-sys-env"
|
|
614
|
-
version = "0.
|
|
601
|
+
version = "0.2.2"
|
|
615
602
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
616
|
-
checksum = "
|
|
603
|
+
checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
|
|
617
604
|
|
|
618
605
|
[[package]]
|
|
619
606
|
name = "regex"
|
|
@@ -650,12 +637,6 @@ version = "1.1.0"
|
|
|
650
637
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
651
638
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
652
639
|
|
|
653
|
-
[[package]]
|
|
654
|
-
name = "rustversion"
|
|
655
|
-
version = "1.0.21"
|
|
656
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
657
|
-
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
|
|
658
|
-
|
|
659
640
|
[[package]]
|
|
660
641
|
name = "ryu"
|
|
661
642
|
version = "1.0.20"
|
|
@@ -711,9 +692,9 @@ dependencies = [
|
|
|
711
692
|
|
|
712
693
|
[[package]]
|
|
713
694
|
name = "serde_magnus"
|
|
714
|
-
version = "0.
|
|
695
|
+
version = "0.10.0"
|
|
715
696
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
716
|
-
checksum = "
|
|
697
|
+
checksum = "c4a5121544138e6a14036e48ecbe589fb63577f35620caaa32642257b412c317"
|
|
717
698
|
dependencies = [
|
|
718
699
|
"magnus",
|
|
719
700
|
"serde",
|
|
@@ -738,16 +719,6 @@ version = "1.0.1"
|
|
|
738
719
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
739
720
|
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
|
|
740
721
|
|
|
741
|
-
[[package]]
|
|
742
|
-
name = "slug"
|
|
743
|
-
version = "0.1.6"
|
|
744
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
745
|
-
checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724"
|
|
746
|
-
dependencies = [
|
|
747
|
-
"deunicode",
|
|
748
|
-
"wasm-bindgen",
|
|
749
|
-
]
|
|
750
|
-
|
|
751
722
|
[[package]]
|
|
752
723
|
name = "strsim"
|
|
753
724
|
version = "0.10.0"
|
|
@@ -903,64 +874,6 @@ dependencies = [
|
|
|
903
874
|
"winapi-util",
|
|
904
875
|
]
|
|
905
876
|
|
|
906
|
-
[[package]]
|
|
907
|
-
name = "wasm-bindgen"
|
|
908
|
-
version = "0.2.100"
|
|
909
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
910
|
-
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
|
911
|
-
dependencies = [
|
|
912
|
-
"cfg-if",
|
|
913
|
-
"once_cell",
|
|
914
|
-
"rustversion",
|
|
915
|
-
"wasm-bindgen-macro",
|
|
916
|
-
]
|
|
917
|
-
|
|
918
|
-
[[package]]
|
|
919
|
-
name = "wasm-bindgen-backend"
|
|
920
|
-
version = "0.2.100"
|
|
921
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
922
|
-
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
|
923
|
-
dependencies = [
|
|
924
|
-
"bumpalo",
|
|
925
|
-
"log",
|
|
926
|
-
"proc-macro2",
|
|
927
|
-
"quote",
|
|
928
|
-
"syn",
|
|
929
|
-
"wasm-bindgen-shared",
|
|
930
|
-
]
|
|
931
|
-
|
|
932
|
-
[[package]]
|
|
933
|
-
name = "wasm-bindgen-macro"
|
|
934
|
-
version = "0.2.100"
|
|
935
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
936
|
-
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
|
937
|
-
dependencies = [
|
|
938
|
-
"quote",
|
|
939
|
-
"wasm-bindgen-macro-support",
|
|
940
|
-
]
|
|
941
|
-
|
|
942
|
-
[[package]]
|
|
943
|
-
name = "wasm-bindgen-macro-support"
|
|
944
|
-
version = "0.2.100"
|
|
945
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
946
|
-
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
|
947
|
-
dependencies = [
|
|
948
|
-
"proc-macro2",
|
|
949
|
-
"quote",
|
|
950
|
-
"syn",
|
|
951
|
-
"wasm-bindgen-backend",
|
|
952
|
-
"wasm-bindgen-shared",
|
|
953
|
-
]
|
|
954
|
-
|
|
955
|
-
[[package]]
|
|
956
|
-
name = "wasm-bindgen-shared"
|
|
957
|
-
version = "0.2.100"
|
|
958
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
959
|
-
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
|
960
|
-
dependencies = [
|
|
961
|
-
"unicode-ident",
|
|
962
|
-
]
|
|
963
|
-
|
|
964
877
|
[[package]]
|
|
965
878
|
name = "winapi-util"
|
|
966
879
|
version = "0.1.9"
|
data/README.md
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
[](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/commits/main)
|
|
4
4
|
[](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/releases)
|
|
5
5
|
|
|
6
|
-
Implements GLFM (as used by GitLab) using the Rust-based
|
|
7
|
-
|
|
8
|
-
_Currently using `comrak 0.43.0`_.
|
|
6
|
+
Implements GLFM (as used by GitLab) using the Rust-based Markdown parser
|
|
7
|
+
[Comrak](https://github.com/kivikakk/comrak) (0.46.0), providing a Ruby interface.
|
|
9
8
|
|
|
10
9
|
This project is still in constant flux, so interfaces and functionality can change at any time.
|
|
11
10
|
|
|
@@ -37,7 +36,7 @@ GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
|
37
36
|
| Option name | Description |
|
|
38
37
|
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
39
38
|
| `autolink` | Enable the `autolink` extension |
|
|
40
|
-
| `cjk_friendly_emphasis` | Enable the `cjk_friendly_emphasis` extension
|
|
39
|
+
| `cjk_friendly_emphasis` | Enable the [`cjk_friendly_emphasis` extension](https://github.com/tats-u/markdown-cjk-friendly) |
|
|
41
40
|
| `description_lists` | Enable the `description-lists` extension |
|
|
42
41
|
| `escape` | Escape raw HTML instead of clobbering it |
|
|
43
42
|
| `escape_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them |
|
|
@@ -58,7 +57,7 @@ GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
|
58
57
|
| `multiline_block_quotes` | Enable the `multiline-block-quotes` extension |
|
|
59
58
|
| `default_html` | Disables any custom HTML, and returns default HTML from `comrak` |
|
|
60
59
|
| `placeholder_detection` | Detect placeholder variables in the format `%{placeholder}` |
|
|
61
|
-
| `relaxed_autolinks` | Enable relaxing of autolink parsing, allowing links to be recognized when in brackets
|
|
60
|
+
| `relaxed_autolinks` | Enable relaxing of autolink parsing, allowing links to be recognized when in brackets, with any scheme, and with dot-less hostnames |
|
|
62
61
|
| `relaxed_tasklist_character` | Enable relaxing which character is allowed in tasklists |
|
|
63
62
|
| `sourcepos` | Include source mappings in HTML attributes |
|
|
64
63
|
| `smart` | Use smart punctuation |
|
|
@@ -129,12 +129,6 @@ version = "2.9.1"
|
|
|
129
129
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
130
|
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
|
|
131
131
|
|
|
132
|
-
[[package]]
|
|
133
|
-
name = "bumpalo"
|
|
134
|
-
version = "3.19.0"
|
|
135
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
136
|
-
checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
|
|
137
|
-
|
|
138
132
|
[[package]]
|
|
139
133
|
name = "caseless"
|
|
140
134
|
version = "0.2.2"
|
|
@@ -227,15 +221,14 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
|
227
221
|
|
|
228
222
|
[[package]]
|
|
229
223
|
name = "comrak"
|
|
230
|
-
version = "0.
|
|
224
|
+
version = "0.46.0"
|
|
231
225
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
232
|
-
checksum = "
|
|
226
|
+
checksum = "dc151d9c800c4fadd542c949b84c1dae6d1b424315ebcfd154e611d4f7910a97"
|
|
233
227
|
dependencies = [
|
|
234
228
|
"caseless",
|
|
235
229
|
"emojis",
|
|
236
230
|
"entities",
|
|
237
|
-
"
|
|
238
|
-
"slug",
|
|
231
|
+
"jetscii",
|
|
239
232
|
"syntect",
|
|
240
233
|
"typed-arena",
|
|
241
234
|
"unicode_categories",
|
|
@@ -259,12 +252,6 @@ dependencies = [
|
|
|
259
252
|
"powerfmt",
|
|
260
253
|
]
|
|
261
254
|
|
|
262
|
-
[[package]]
|
|
263
|
-
name = "deunicode"
|
|
264
|
-
version = "1.6.2"
|
|
265
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
266
|
-
checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04"
|
|
267
|
-
|
|
268
255
|
[[package]]
|
|
269
256
|
name = "either"
|
|
270
257
|
version = "1.15.0"
|
|
@@ -320,7 +307,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
320
307
|
|
|
321
308
|
[[package]]
|
|
322
309
|
name = "glfm_markdown"
|
|
323
|
-
version = "0.0.
|
|
310
|
+
version = "0.0.38"
|
|
324
311
|
dependencies = [
|
|
325
312
|
"clap",
|
|
326
313
|
"comrak",
|
|
@@ -381,6 +368,12 @@ version = "1.0.15"
|
|
|
381
368
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
382
369
|
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|
383
370
|
|
|
371
|
+
[[package]]
|
|
372
|
+
name = "jetscii"
|
|
373
|
+
version = "0.5.3"
|
|
374
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
375
|
+
checksum = "47f142fe24a9c9944451e8349de0a56af5f3e7226dc46f3ed4d4ecc0b85af75e"
|
|
376
|
+
|
|
384
377
|
[[package]]
|
|
385
378
|
name = "lazy_static"
|
|
386
379
|
version = "1.5.0"
|
|
@@ -415,17 +408,11 @@ version = "0.5.6"
|
|
|
415
408
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
416
409
|
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|
417
410
|
|
|
418
|
-
[[package]]
|
|
419
|
-
name = "log"
|
|
420
|
-
version = "0.4.27"
|
|
421
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
422
|
-
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
|
423
|
-
|
|
424
411
|
[[package]]
|
|
425
412
|
name = "magnus"
|
|
426
|
-
version = "0.
|
|
413
|
+
version = "0.8.2"
|
|
427
414
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
428
|
-
checksum = "
|
|
415
|
+
checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
|
|
429
416
|
dependencies = [
|
|
430
417
|
"magnus-macros",
|
|
431
418
|
"rb-sys",
|
|
@@ -435,9 +422,9 @@ dependencies = [
|
|
|
435
422
|
|
|
436
423
|
[[package]]
|
|
437
424
|
name = "magnus-macros"
|
|
438
|
-
version = "0.
|
|
425
|
+
version = "0.8.0"
|
|
439
426
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
440
|
-
checksum = "
|
|
427
|
+
checksum = "47607461fd8e1513cb4f2076c197d8092d921a1ea75bd08af97398f593751892"
|
|
441
428
|
dependencies = [
|
|
442
429
|
"proc-macro2",
|
|
443
430
|
"quote",
|
|
@@ -587,18 +574,18 @@ dependencies = [
|
|
|
587
574
|
|
|
588
575
|
[[package]]
|
|
589
576
|
name = "rb-sys"
|
|
590
|
-
version = "0.9.
|
|
577
|
+
version = "0.9.117"
|
|
591
578
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
592
|
-
checksum = "
|
|
579
|
+
checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
|
|
593
580
|
dependencies = [
|
|
594
581
|
"rb-sys-build",
|
|
595
582
|
]
|
|
596
583
|
|
|
597
584
|
[[package]]
|
|
598
585
|
name = "rb-sys-build"
|
|
599
|
-
version = "0.9.
|
|
586
|
+
version = "0.9.117"
|
|
600
587
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
601
|
-
checksum = "
|
|
588
|
+
checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
|
|
602
589
|
dependencies = [
|
|
603
590
|
"bindgen",
|
|
604
591
|
"lazy_static",
|
|
@@ -611,9 +598,9 @@ dependencies = [
|
|
|
611
598
|
|
|
612
599
|
[[package]]
|
|
613
600
|
name = "rb-sys-env"
|
|
614
|
-
version = "0.
|
|
601
|
+
version = "0.2.2"
|
|
615
602
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
616
|
-
checksum = "
|
|
603
|
+
checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
|
|
617
604
|
|
|
618
605
|
[[package]]
|
|
619
606
|
name = "regex"
|
|
@@ -650,12 +637,6 @@ version = "1.1.0"
|
|
|
650
637
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
651
638
|
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
652
639
|
|
|
653
|
-
[[package]]
|
|
654
|
-
name = "rustversion"
|
|
655
|
-
version = "1.0.21"
|
|
656
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
657
|
-
checksum = "8a0d197bd2c9dc6e53b84da9556a69ba4cdfab8619eb41a8bd1cc2027a0f6b1d"
|
|
658
|
-
|
|
659
640
|
[[package]]
|
|
660
641
|
name = "ryu"
|
|
661
642
|
version = "1.0.20"
|
|
@@ -711,9 +692,9 @@ dependencies = [
|
|
|
711
692
|
|
|
712
693
|
[[package]]
|
|
713
694
|
name = "serde_magnus"
|
|
714
|
-
version = "0.
|
|
695
|
+
version = "0.10.0"
|
|
715
696
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
716
|
-
checksum = "
|
|
697
|
+
checksum = "c4a5121544138e6a14036e48ecbe589fb63577f35620caaa32642257b412c317"
|
|
717
698
|
dependencies = [
|
|
718
699
|
"magnus",
|
|
719
700
|
"serde",
|
|
@@ -738,16 +719,6 @@ version = "1.0.1"
|
|
|
738
719
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
739
720
|
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
|
|
740
721
|
|
|
741
|
-
[[package]]
|
|
742
|
-
name = "slug"
|
|
743
|
-
version = "0.1.6"
|
|
744
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
745
|
-
checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724"
|
|
746
|
-
dependencies = [
|
|
747
|
-
"deunicode",
|
|
748
|
-
"wasm-bindgen",
|
|
749
|
-
]
|
|
750
|
-
|
|
751
722
|
[[package]]
|
|
752
723
|
name = "strsim"
|
|
753
724
|
version = "0.10.0"
|
|
@@ -903,64 +874,6 @@ dependencies = [
|
|
|
903
874
|
"winapi-util",
|
|
904
875
|
]
|
|
905
876
|
|
|
906
|
-
[[package]]
|
|
907
|
-
name = "wasm-bindgen"
|
|
908
|
-
version = "0.2.100"
|
|
909
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
910
|
-
checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5"
|
|
911
|
-
dependencies = [
|
|
912
|
-
"cfg-if",
|
|
913
|
-
"once_cell",
|
|
914
|
-
"rustversion",
|
|
915
|
-
"wasm-bindgen-macro",
|
|
916
|
-
]
|
|
917
|
-
|
|
918
|
-
[[package]]
|
|
919
|
-
name = "wasm-bindgen-backend"
|
|
920
|
-
version = "0.2.100"
|
|
921
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
922
|
-
checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6"
|
|
923
|
-
dependencies = [
|
|
924
|
-
"bumpalo",
|
|
925
|
-
"log",
|
|
926
|
-
"proc-macro2",
|
|
927
|
-
"quote",
|
|
928
|
-
"syn",
|
|
929
|
-
"wasm-bindgen-shared",
|
|
930
|
-
]
|
|
931
|
-
|
|
932
|
-
[[package]]
|
|
933
|
-
name = "wasm-bindgen-macro"
|
|
934
|
-
version = "0.2.100"
|
|
935
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
936
|
-
checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407"
|
|
937
|
-
dependencies = [
|
|
938
|
-
"quote",
|
|
939
|
-
"wasm-bindgen-macro-support",
|
|
940
|
-
]
|
|
941
|
-
|
|
942
|
-
[[package]]
|
|
943
|
-
name = "wasm-bindgen-macro-support"
|
|
944
|
-
version = "0.2.100"
|
|
945
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
946
|
-
checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de"
|
|
947
|
-
dependencies = [
|
|
948
|
-
"proc-macro2",
|
|
949
|
-
"quote",
|
|
950
|
-
"syn",
|
|
951
|
-
"wasm-bindgen-backend",
|
|
952
|
-
"wasm-bindgen-shared",
|
|
953
|
-
]
|
|
954
|
-
|
|
955
|
-
[[package]]
|
|
956
|
-
name = "wasm-bindgen-shared"
|
|
957
|
-
version = "0.2.100"
|
|
958
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
959
|
-
checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d"
|
|
960
|
-
dependencies = [
|
|
961
|
-
"unicode-ident",
|
|
962
|
-
]
|
|
963
|
-
|
|
964
877
|
[[package]]
|
|
965
878
|
name = "winapi-util"
|
|
966
879
|
version = "0.1.9"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "glfm_markdown"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.38"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["digitalmoksha <bwalker@gitlab.com>", "Asherah Connor <aconnor@gitlab.com>"]
|
|
6
6
|
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible. Experimental."
|
|
@@ -15,12 +15,12 @@ required-features = ["cli"]
|
|
|
15
15
|
|
|
16
16
|
[dependencies]
|
|
17
17
|
clap = { version = "=4.4.18", optional = true, features = ["derive", "string"] }
|
|
18
|
-
comrak = { version = "0.
|
|
19
|
-
magnus = "0.
|
|
20
|
-
rb-sys = { version = "0.9.
|
|
18
|
+
comrak = { version = "0.46.0", default-features = false, features = ["shortcodes"] }
|
|
19
|
+
magnus = "0.8.2"
|
|
20
|
+
rb-sys = { version = "0.9.117", default-features = false, features = ["stable-api-compiled-fallback"] }
|
|
21
21
|
regex = "1.11.1"
|
|
22
22
|
lazy_static = "1.5.0"
|
|
23
|
-
serde_magnus = "0.
|
|
23
|
+
serde_magnus = "0.10.0"
|
|
24
24
|
serde = { version = "1.0.219", features = ["serde_derive"] }
|
|
25
25
|
|
|
26
26
|
[features]
|
|
@@ -68,7 +68,7 @@ fn render_image<'a>(
|
|
|
68
68
|
context.write_str("<img")?;
|
|
69
69
|
html::render_sourcepos(context, node)?;
|
|
70
70
|
context.write_str(" src=\"")?;
|
|
71
|
-
if context.options.render.
|
|
71
|
+
if context.options.render.r#unsafe || !html::dangerous_url(&nl.url) {
|
|
72
72
|
if let Some(rewriter) = &context.options.extension.image_url_rewriter {
|
|
73
73
|
context.escape_href(&rewriter.to_html(&nl.url))?;
|
|
74
74
|
} else {
|
|
@@ -130,7 +130,7 @@ fn render_link<'a>(
|
|
|
130
130
|
context.write_str("<a")?;
|
|
131
131
|
html::render_sourcepos(context, node)?;
|
|
132
132
|
context.write_str(" href=\"")?;
|
|
133
|
-
if context.options.render.
|
|
133
|
+
if context.options.render.r#unsafe || !html::dangerous_url(&nl.url) {
|
|
134
134
|
if let Some(rewriter) = &context.options.extension.link_url_rewriter {
|
|
135
135
|
context.escape_href(&rewriter.to_html(&nl.url))?;
|
|
136
136
|
} else {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
use comrak::
|
|
1
|
+
use comrak::options::Plugins;
|
|
2
|
+
use comrak::{parse_document, Arena};
|
|
2
3
|
use serde::Deserialize;
|
|
3
4
|
|
|
4
5
|
use crate::formatter::{CustomFormatter, RenderUserData};
|
|
@@ -112,24 +113,24 @@ impl From<&RenderOptions> for comrak::Options<'_> {
|
|
|
112
113
|
comrak_options.render.github_pre_lang = options.github_pre_lang;
|
|
113
114
|
comrak_options.render.hardbreaks = options.hardbreaks;
|
|
114
115
|
comrak_options.render.ignore_empty_links = options.ignore_empty_links;
|
|
115
|
-
comrak_options.render.ignore_setext = options.ignore_setext;
|
|
116
116
|
comrak_options.render.sourcepos = options.sourcepos;
|
|
117
117
|
comrak_options.render.tasklist_classes = options.tasklist_classes;
|
|
118
118
|
// comrak_options.render.syntax_highlighting = options.syntax_highlighting;
|
|
119
119
|
|
|
120
|
-
comrak_options.render.
|
|
120
|
+
comrak_options.render.r#unsafe = options.r#unsafe;
|
|
121
121
|
|
|
122
122
|
// comrak_options.parse.default_info_string = options.default_info_string;
|
|
123
123
|
comrak_options.parse.relaxed_autolinks = options.relaxed_autolinks;
|
|
124
124
|
comrak_options.parse.relaxed_tasklist_matching = options.relaxed_tasklist_character;
|
|
125
125
|
comrak_options.parse.smart = options.smart;
|
|
126
|
+
comrak_options.parse.ignore_setext = options.ignore_setext;
|
|
126
127
|
|
|
127
128
|
comrak_options
|
|
128
129
|
}
|
|
129
130
|
}
|
|
130
131
|
|
|
131
132
|
pub fn render(text: &str, options: &RenderOptions) -> String {
|
|
132
|
-
render_with_plugins(text, options, &
|
|
133
|
+
render_with_plugins(text, options, &Plugins::default())
|
|
133
134
|
}
|
|
134
135
|
|
|
135
136
|
fn render_with_plugins(text: &str, render_options: &RenderOptions, plugins: &Plugins) -> String {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
use comrak::{escape_commonmark_inline, escape_commonmark_link_destination};
|
|
2
|
-
use magnus::{
|
|
2
|
+
use magnus::{function, prelude::*, Error, RHash, RString, Ruby};
|
|
3
3
|
use serde_magnus::deserialize;
|
|
4
4
|
|
|
5
5
|
mod formatter;
|
|
6
6
|
mod glfm;
|
|
7
7
|
use glfm::{render, RenderOptions};
|
|
8
8
|
|
|
9
|
-
pub fn render_to_html_rs(text: RString, options: RHash) -> Result<String, Error> {
|
|
10
|
-
let render_options: RenderOptions = deserialize(options)?;
|
|
9
|
+
pub fn render_to_html_rs(ruby: &Ruby, text: RString, options: RHash) -> Result<String, Error> {
|
|
10
|
+
let render_options: RenderOptions = deserialize(ruby, options)?;
|
|
11
11
|
|
|
12
12
|
// SAFETY: `RString::as_str` returns a reference directly to Ruby memory.
|
|
13
13
|
// We do not hold onto or save the `&str`, or otherwise permit Ruby to GC or
|
|
@@ -35,8 +35,8 @@ pub fn escape_commonmark_link_destination_rs(text: RString) -> Result<String, Er
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
#[magnus::init]
|
|
38
|
-
fn init() -> Result<(), Error> {
|
|
39
|
-
let module = define_module("GLFMMarkdown")?;
|
|
38
|
+
fn init(ruby: &Ruby) -> Result<(), Error> {
|
|
39
|
+
let module = ruby.define_module("GLFMMarkdown")?;
|
|
40
40
|
|
|
41
41
|
module.define_singleton_method("render_to_html_rs", function!(render_to_html_rs, 2))?;
|
|
42
42
|
module.define_singleton_method(
|
|
@@ -157,8 +157,8 @@ struct Args {
|
|
|
157
157
|
underline: bool,
|
|
158
158
|
|
|
159
159
|
/// Allow raw HTML and dangerous URLs
|
|
160
|
-
#[arg(long
|
|
161
|
-
|
|
160
|
+
#[arg(long)]
|
|
161
|
+
r#unsafe: bool,
|
|
162
162
|
|
|
163
163
|
/// Enable 'wikilink_title_after_pipe' extension
|
|
164
164
|
#[arg(long)]
|
|
@@ -249,7 +249,7 @@ fn main() {
|
|
|
249
249
|
tasklist: cli.tasklist,
|
|
250
250
|
tasklist_classes: cli.tasklist_classes,
|
|
251
251
|
underline: cli.underline,
|
|
252
|
-
r#unsafe: cli.
|
|
252
|
+
r#unsafe: cli.r#unsafe,
|
|
253
253
|
wikilinks_title_after_pipe: cli.wikilinks_title_after_pipe,
|
|
254
254
|
wikilinks_title_before_pipe: cli.wikilinks_title_before_pipe,
|
|
255
255
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitlab-glfm-markdown
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.38
|
|
5
5
|
platform: x86_64-linux-musl
|
|
6
6
|
authors:
|
|
7
7
|
- Brett Walker
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2025-10-
|
|
12
|
+
date: 2025-10-29 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rb_sys
|