gitlab-glfm-markdown 0.0.36-aarch64-linux-musl → 0.0.38-aarch64-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 +8 -4
- 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 +7 -4
- data/ext/glfm_markdown/src/lib.rs +5 -5
- data/ext/glfm_markdown/src/main.rs +8 -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
- data/lib/glfm_markdown.rb +1 -0
- 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: 970da7ff6d15476d58ad73085a45bd8493fe2127d6bfc33c14d0b219001eb3a9
|
|
4
|
+
data.tar.gz: 41491eca2981a2e6c31698ecd9df16ee6a83ea440c0ce2b62b2987ac5c765984
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 36158328d1b1f8eb521c523d19727fb341c332b4d83c8f8eadc6efef894faf0744d267cbfa718cc23b5af74852a245b6fa1a9a7a5a4ed22bfc8f7e377daa2fa6
|
|
7
|
+
data.tar.gz: 2aaab79e91935c9845bb6fea15c30514511262a39c6bdeb0d5c8de719d269efbe1283dc926647927bb71049c663afb56ade406545ccb4581279f3a02bcb04f72
|
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,6 +36,7 @@ GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
|
37
36
|
| Option name | Description |
|
|
38
37
|
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
39
38
|
| `autolink` | Enable the `autolink` extension |
|
|
39
|
+
| `cjk_friendly_emphasis` | Enable the [`cjk_friendly_emphasis` extension](https://github.com/tats-u/markdown-cjk-friendly) |
|
|
40
40
|
| `description_lists` | Enable the `description-lists` extension |
|
|
41
41
|
| `escape` | Escape raw HTML instead of clobbering it |
|
|
42
42
|
| `escape_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them |
|
|
@@ -57,7 +57,7 @@ GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
|
57
57
|
| `multiline_block_quotes` | Enable the `multiline-block-quotes` extension |
|
|
58
58
|
| `default_html` | Disables any custom HTML, and returns default HTML from `comrak` |
|
|
59
59
|
| `placeholder_detection` | Detect placeholder variables in the format `%{placeholder}` |
|
|
60
|
-
| `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 |
|
|
61
61
|
| `relaxed_tasklist_character` | Enable relaxing which character is allowed in tasklists |
|
|
62
62
|
| `sourcepos` | Include source mappings in HTML attributes |
|
|
63
63
|
| `smart` | Use smart punctuation |
|
|
@@ -111,4 +111,8 @@ published to [RubyGems](https://rubygems.org/gems/gitlab-glfm-markdown).
|
|
|
111
111
|
|
|
112
112
|
Bug reports and merge requests are welcome on GitLab at https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown.
|
|
113
113
|
|
|
114
|
+
Visit the [Community Contribute](https://about.gitlab.com/community/contribute/)
|
|
115
|
+
page for general information about contributing to GitLab, and using the
|
|
116
|
+
[community fork](https://gitlab.com/gitlab-community/gitlab-org/ruby/gems/gitlab-glfm-markdown).
|
|
117
|
+
|
|
114
118
|
Please refer to [CONTRIBUTING](CONTRIBUTING.md) for more details.
|
|
@@ -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};
|
|
@@ -8,6 +9,7 @@ use crate::formatter::{CustomFormatter, RenderUserData};
|
|
|
8
9
|
pub struct RenderOptions {
|
|
9
10
|
pub alerts: bool,
|
|
10
11
|
pub autolink: bool,
|
|
12
|
+
pub cjk_friendly_emphasis: bool,
|
|
11
13
|
// pub default_info_string: String,
|
|
12
14
|
pub description_lists: bool,
|
|
13
15
|
pub escape: bool,
|
|
@@ -82,6 +84,7 @@ impl From<&RenderOptions> for comrak::Options<'_> {
|
|
|
82
84
|
|
|
83
85
|
comrak_options.extension.alerts = options.alerts;
|
|
84
86
|
comrak_options.extension.autolink = options.autolink;
|
|
87
|
+
comrak_options.extension.cjk_friendly_emphasis = options.cjk_friendly_emphasis;
|
|
85
88
|
comrak_options.extension.description_lists = options.description_lists;
|
|
86
89
|
comrak_options.extension.footnotes = options.footnotes;
|
|
87
90
|
// comrak_options.extension.front_matter_delimiter = options.front_matter_delimiter;
|
|
@@ -110,24 +113,24 @@ impl From<&RenderOptions> for comrak::Options<'_> {
|
|
|
110
113
|
comrak_options.render.github_pre_lang = options.github_pre_lang;
|
|
111
114
|
comrak_options.render.hardbreaks = options.hardbreaks;
|
|
112
115
|
comrak_options.render.ignore_empty_links = options.ignore_empty_links;
|
|
113
|
-
comrak_options.render.ignore_setext = options.ignore_setext;
|
|
114
116
|
comrak_options.render.sourcepos = options.sourcepos;
|
|
115
117
|
comrak_options.render.tasklist_classes = options.tasklist_classes;
|
|
116
118
|
// comrak_options.render.syntax_highlighting = options.syntax_highlighting;
|
|
117
119
|
|
|
118
|
-
comrak_options.render.
|
|
120
|
+
comrak_options.render.r#unsafe = options.r#unsafe;
|
|
119
121
|
|
|
120
122
|
// comrak_options.parse.default_info_string = options.default_info_string;
|
|
121
123
|
comrak_options.parse.relaxed_autolinks = options.relaxed_autolinks;
|
|
122
124
|
comrak_options.parse.relaxed_tasklist_matching = options.relaxed_tasklist_character;
|
|
123
125
|
comrak_options.parse.smart = options.smart;
|
|
126
|
+
comrak_options.parse.ignore_setext = options.ignore_setext;
|
|
124
127
|
|
|
125
128
|
comrak_options
|
|
126
129
|
}
|
|
127
130
|
}
|
|
128
131
|
|
|
129
132
|
pub fn render(text: &str, options: &RenderOptions) -> String {
|
|
130
|
-
render_with_plugins(text, options, &
|
|
133
|
+
render_with_plugins(text, options, &Plugins::default())
|
|
131
134
|
}
|
|
132
135
|
|
|
133
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)]
|
|
@@ -188,6 +188,10 @@ struct Args {
|
|
|
188
188
|
#[arg(long)]
|
|
189
189
|
only_escape_chars: Option<String>,
|
|
190
190
|
|
|
191
|
+
/// Enable 'cjk_friendly_emphasis' extension
|
|
192
|
+
#[arg(long)]
|
|
193
|
+
cjk_friendly_emphasis: bool,
|
|
194
|
+
|
|
191
195
|
/// Show debug information
|
|
192
196
|
#[arg(long)]
|
|
193
197
|
debug: bool,
|
|
@@ -210,6 +214,7 @@ fn main() {
|
|
|
210
214
|
let options = RenderOptions {
|
|
211
215
|
alerts: cli.alerts,
|
|
212
216
|
autolink: cli.autolink,
|
|
217
|
+
cjk_friendly_emphasis: cli.cjk_friendly_emphasis,
|
|
213
218
|
// default_info_string:
|
|
214
219
|
description_lists: cli.description_lists,
|
|
215
220
|
escape: cli.escape,
|
|
@@ -244,7 +249,7 @@ fn main() {
|
|
|
244
249
|
tasklist: cli.tasklist,
|
|
245
250
|
tasklist_classes: cli.tasklist_classes,
|
|
246
251
|
underline: cli.underline,
|
|
247
|
-
r#unsafe: cli.
|
|
252
|
+
r#unsafe: cli.r#unsafe,
|
|
248
253
|
wikilinks_title_after_pipe: cli.wikilinks_title_after_pipe,
|
|
249
254
|
wikilinks_title_before_pipe: cli.wikilinks_title_before_pipe,
|
|
250
255
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
data/lib/glfm_markdown.rb
CHANGED
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: aarch64-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
|