gitlab-glfm-markdown 0.0.41-x86_64-linux-gnu → 0.0.42-x86_64-linux-gnu
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 +84 -42
- data/README.md +54 -47
- data/ext/gitlab_glfm_markdown/Cargo.lock +84 -42
- data/ext/gitlab_glfm_markdown/Cargo.toml +4 -4
- data/ext/gitlab_glfm_markdown/src/formatter.rs +9 -2
- data/ext/gitlab_glfm_markdown/src/glfm.rs +7 -2
- data/ext/gitlab_glfm_markdown/src/main.rs +9 -3
- data/lib/gitlab_glfm_markdown/3.1/gitlab_glfm_markdown.so +0 -0
- data/lib/gitlab_glfm_markdown/3.2/gitlab_glfm_markdown.so +0 -0
- data/lib/gitlab_glfm_markdown/3.3/gitlab_glfm_markdown.so +0 -0
- data/lib/gitlab_glfm_markdown/3.4/gitlab_glfm_markdown.so +0 -0
- data/lib/gitlab_glfm_markdown/4.0/gitlab_glfm_markdown.so +0 -0
- data/lib/gitlab_glfm_markdown/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ee24f47fab0fdebc75a88fbfb359d46abb81b56065e8ccf183b3eb9ec2443ed
|
|
4
|
+
data.tar.gz: d4e75b97e9ac473edb08bbc777709cda3e0975c6fe0201d2429b22191efb6510
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd2d23d671b86c60c2ba46dfa11566acd7ec583e3a99ac89ee68638ce0312ebeeb292faa76c18eb2f64a276b53dc2314ee97955535b27325ddb7faae9f704665
|
|
7
|
+
data.tar.gz: 4f4351b61a01344e872d794776331cef836fa21b999451a4786943f2fa6a69ef01f4e32aaeead56f641cb0dabfb4d47d06af3665bfacfcbb27162c5f0634ed6c
|
data/Cargo.lock
CHANGED
|
@@ -84,21 +84,19 @@ dependencies = [
|
|
|
84
84
|
|
|
85
85
|
[[package]]
|
|
86
86
|
name = "bindgen"
|
|
87
|
-
version = "0.
|
|
87
|
+
version = "0.72.1"
|
|
88
88
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
|
-
checksum = "
|
|
89
|
+
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
|
|
90
90
|
dependencies = [
|
|
91
91
|
"bitflags 2.9.1",
|
|
92
92
|
"cexpr",
|
|
93
93
|
"clang-sys",
|
|
94
94
|
"itertools",
|
|
95
|
-
"lazy_static",
|
|
96
|
-
"lazycell",
|
|
97
95
|
"proc-macro2",
|
|
98
96
|
"quote",
|
|
99
97
|
"regex",
|
|
100
98
|
"rustc-hash",
|
|
101
|
-
"shlex",
|
|
99
|
+
"shlex 1.3.0",
|
|
102
100
|
"syn",
|
|
103
101
|
]
|
|
104
102
|
|
|
@@ -140,11 +138,12 @@ dependencies = [
|
|
|
140
138
|
|
|
141
139
|
[[package]]
|
|
142
140
|
name = "cc"
|
|
143
|
-
version = "1.2.
|
|
141
|
+
version = "1.2.66"
|
|
144
142
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
-
checksum = "
|
|
143
|
+
checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
|
|
146
144
|
dependencies = [
|
|
147
|
-
"
|
|
145
|
+
"find-msvc-tools",
|
|
146
|
+
"shlex 2.0.1",
|
|
148
147
|
]
|
|
149
148
|
|
|
150
149
|
[[package]]
|
|
@@ -221,17 +220,21 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
|
221
220
|
|
|
222
221
|
[[package]]
|
|
223
222
|
name = "comrak"
|
|
224
|
-
version = "0.
|
|
223
|
+
version = "0.53.0"
|
|
225
224
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
-
checksum = "
|
|
225
|
+
checksum = "9795cb30f4deefbf33488819707e0f9630535dd56208ec273c1b3f150196377a"
|
|
227
226
|
dependencies = [
|
|
228
227
|
"caseless",
|
|
229
228
|
"emojis",
|
|
230
229
|
"entities",
|
|
230
|
+
"finl_unicode",
|
|
231
231
|
"jetscii",
|
|
232
|
+
"phf",
|
|
233
|
+
"phf_codegen",
|
|
234
|
+
"rustc-hash",
|
|
235
|
+
"smallvec",
|
|
232
236
|
"syntect",
|
|
233
237
|
"typed-arena",
|
|
234
|
-
"unicode_categories",
|
|
235
238
|
]
|
|
236
239
|
|
|
237
240
|
[[package]]
|
|
@@ -260,9 +263,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
|
260
263
|
|
|
261
264
|
[[package]]
|
|
262
265
|
name = "emojis"
|
|
263
|
-
version = "0.
|
|
266
|
+
version = "0.8.2"
|
|
264
267
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
265
|
-
checksum = "
|
|
268
|
+
checksum = "0a4d5d50b0b58df5173d8ff1192b4d1422ceae5d981b30d4b6f8ed1d673a2bc4"
|
|
266
269
|
dependencies = [
|
|
267
270
|
"phf",
|
|
268
271
|
]
|
|
@@ -289,6 +292,24 @@ dependencies = [
|
|
|
289
292
|
"regex",
|
|
290
293
|
]
|
|
291
294
|
|
|
295
|
+
[[package]]
|
|
296
|
+
name = "fastrand"
|
|
297
|
+
version = "2.4.1"
|
|
298
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
299
|
+
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
|
300
|
+
|
|
301
|
+
[[package]]
|
|
302
|
+
name = "find-msvc-tools"
|
|
303
|
+
version = "0.1.9"
|
|
304
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
305
|
+
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
|
306
|
+
|
|
307
|
+
[[package]]
|
|
308
|
+
name = "finl_unicode"
|
|
309
|
+
version = "1.4.0"
|
|
310
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
311
|
+
checksum = "9844ddc3a6e533d62bba727eb6c28b5d360921d5175e9ff0f1e621a5c590a4d5"
|
|
312
|
+
|
|
292
313
|
[[package]]
|
|
293
314
|
name = "flate2"
|
|
294
315
|
version = "1.1.2"
|
|
@@ -307,7 +328,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
307
328
|
|
|
308
329
|
[[package]]
|
|
309
330
|
name = "gitlab-glfm-markdown"
|
|
310
|
-
version = "0.0.
|
|
331
|
+
version = "0.0.42"
|
|
311
332
|
dependencies = [
|
|
312
333
|
"clap",
|
|
313
334
|
"comrak",
|
|
@@ -380,12 +401,6 @@ version = "1.5.0"
|
|
|
380
401
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
381
402
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
382
403
|
|
|
383
|
-
[[package]]
|
|
384
|
-
name = "lazycell"
|
|
385
|
-
version = "1.3.0"
|
|
386
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
387
|
-
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
388
|
-
|
|
389
404
|
[[package]]
|
|
390
405
|
name = "libc"
|
|
391
406
|
version = "0.2.174"
|
|
@@ -482,9 +497,9 @@ checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
|
|
|
482
497
|
|
|
483
498
|
[[package]]
|
|
484
499
|
name = "onig"
|
|
485
|
-
version = "6.5.
|
|
500
|
+
version = "6.5.3"
|
|
486
501
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
487
|
-
checksum = "
|
|
502
|
+
checksum = "0cc3cbf698f9438986c11a880c90a6d04b9de27575afd28bbf45b154b6c709e2"
|
|
488
503
|
dependencies = [
|
|
489
504
|
"bitflags 2.9.1",
|
|
490
505
|
"libc",
|
|
@@ -494,9 +509,9 @@ dependencies = [
|
|
|
494
509
|
|
|
495
510
|
[[package]]
|
|
496
511
|
name = "onig_sys"
|
|
497
|
-
version = "69.9.
|
|
512
|
+
version = "69.9.3"
|
|
498
513
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
499
|
-
checksum = "
|
|
514
|
+
checksum = "1e68317604e77e53b85896388e1a803c1d21b74c899ec9e5e1112db90735edd7"
|
|
500
515
|
dependencies = [
|
|
501
516
|
"cc",
|
|
502
517
|
"pkg-config",
|
|
@@ -504,27 +519,48 @@ dependencies = [
|
|
|
504
519
|
|
|
505
520
|
[[package]]
|
|
506
521
|
name = "phf"
|
|
507
|
-
version = "0.
|
|
522
|
+
version = "0.13.1"
|
|
523
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
524
|
+
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
|
|
525
|
+
dependencies = [
|
|
526
|
+
"phf_shared",
|
|
527
|
+
"serde",
|
|
528
|
+
]
|
|
529
|
+
|
|
530
|
+
[[package]]
|
|
531
|
+
name = "phf_codegen"
|
|
532
|
+
version = "0.13.1"
|
|
508
533
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
509
|
-
checksum = "
|
|
534
|
+
checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
|
|
510
535
|
dependencies = [
|
|
536
|
+
"phf_generator",
|
|
537
|
+
"phf_shared",
|
|
538
|
+
]
|
|
539
|
+
|
|
540
|
+
[[package]]
|
|
541
|
+
name = "phf_generator"
|
|
542
|
+
version = "0.13.1"
|
|
543
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
544
|
+
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
|
|
545
|
+
dependencies = [
|
|
546
|
+
"fastrand",
|
|
511
547
|
"phf_shared",
|
|
512
548
|
]
|
|
513
549
|
|
|
514
550
|
[[package]]
|
|
515
551
|
name = "phf_shared"
|
|
516
|
-
version = "0.
|
|
552
|
+
version = "0.13.1"
|
|
517
553
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
518
|
-
checksum = "
|
|
554
|
+
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
|
519
555
|
dependencies = [
|
|
520
556
|
"siphasher",
|
|
521
557
|
]
|
|
522
558
|
|
|
523
559
|
[[package]]
|
|
524
560
|
name = "pkg-config"
|
|
525
|
-
version = "0.3.
|
|
561
|
+
version = "0.3.33"
|
|
526
562
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
527
|
-
checksum = "
|
|
563
|
+
checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
|
528
564
|
|
|
529
565
|
[[package]]
|
|
530
566
|
name = "plist"
|
|
@@ -574,18 +610,18 @@ dependencies = [
|
|
|
574
610
|
|
|
575
611
|
[[package]]
|
|
576
612
|
name = "rb-sys"
|
|
577
|
-
version = "0.9.
|
|
613
|
+
version = "0.9.128"
|
|
578
614
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
579
|
-
checksum = "
|
|
615
|
+
checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
|
|
580
616
|
dependencies = [
|
|
581
617
|
"rb-sys-build",
|
|
582
618
|
]
|
|
583
619
|
|
|
584
620
|
[[package]]
|
|
585
621
|
name = "rb-sys-build"
|
|
586
|
-
version = "0.9.
|
|
622
|
+
version = "0.9.128"
|
|
587
623
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
588
|
-
checksum = "
|
|
624
|
+
checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
|
|
589
625
|
dependencies = [
|
|
590
626
|
"bindgen",
|
|
591
627
|
"lazy_static",
|
|
@@ -633,9 +669,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
|
633
669
|
|
|
634
670
|
[[package]]
|
|
635
671
|
name = "rustc-hash"
|
|
636
|
-
version = "
|
|
672
|
+
version = "2.1.2"
|
|
637
673
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
638
|
-
checksum = "
|
|
674
|
+
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
|
639
675
|
|
|
640
676
|
[[package]]
|
|
641
677
|
name = "ryu"
|
|
@@ -713,12 +749,24 @@ version = "1.3.0"
|
|
|
713
749
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
714
750
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
715
751
|
|
|
752
|
+
[[package]]
|
|
753
|
+
name = "shlex"
|
|
754
|
+
version = "2.0.1"
|
|
755
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
756
|
+
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
757
|
+
|
|
716
758
|
[[package]]
|
|
717
759
|
name = "siphasher"
|
|
718
760
|
version = "1.0.1"
|
|
719
761
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
720
762
|
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
|
|
721
763
|
|
|
764
|
+
[[package]]
|
|
765
|
+
name = "smallvec"
|
|
766
|
+
version = "1.15.2"
|
|
767
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
768
|
+
checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
|
|
769
|
+
|
|
722
770
|
[[package]]
|
|
723
771
|
name = "strsim"
|
|
724
772
|
version = "0.10.0"
|
|
@@ -852,12 +900,6 @@ dependencies = [
|
|
|
852
900
|
"tinyvec",
|
|
853
901
|
]
|
|
854
902
|
|
|
855
|
-
[[package]]
|
|
856
|
-
name = "unicode_categories"
|
|
857
|
-
version = "0.1.1"
|
|
858
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
859
|
-
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
|
|
860
|
-
|
|
861
903
|
[[package]]
|
|
862
904
|
name = "utf8parse"
|
|
863
905
|
version = "0.2.2"
|
data/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/releases)
|
|
5
5
|
|
|
6
6
|
Implements GLFM (as used by GitLab) using the Rust-based Markdown parser
|
|
7
|
-
[Comrak](https://github.com/kivikakk/comrak) (0.
|
|
7
|
+
[Comrak](https://github.com/kivikakk/comrak) (0.53.0), providing a Ruby interface.
|
|
8
8
|
|
|
9
9
|
This project is still in constant flux, so interfaces and functionality can change at any time.
|
|
10
10
|
|
|
@@ -12,20 +12,26 @@ This project is still in constant flux, so interfaces and functionality can chan
|
|
|
12
12
|
|
|
13
13
|
Install the gem and add to the application's Gemfile by executing:
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
```sh
|
|
16
|
+
bundle add gitlab-glfm-markdown
|
|
17
|
+
```
|
|
16
18
|
|
|
17
19
|
If bundler is not being used to manage dependencies, install the gem by executing:
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
```sh
|
|
22
|
+
gem install gitlab-glfm-markdown
|
|
23
|
+
```
|
|
20
24
|
|
|
21
25
|
## Usage
|
|
22
26
|
|
|
23
27
|
Try on command line:
|
|
24
28
|
|
|
25
|
-
```
|
|
29
|
+
```sh
|
|
26
30
|
rake compile
|
|
27
31
|
bin/console
|
|
32
|
+
```
|
|
28
33
|
|
|
34
|
+
```ruby
|
|
29
35
|
require 'gitlab-glfm-markdown'
|
|
30
36
|
|
|
31
37
|
GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
@@ -33,48 +39,49 @@ GLFMMarkdown.to_html('# header', options: { sourcepos: true })
|
|
|
33
39
|
|
|
34
40
|
### Options
|
|
35
41
|
|
|
36
|
-
| Option name | Description
|
|
37
|
-
|
|
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
|
-
| `default_html` | Disables any custom HTML, and returns default HTML from `comrak`
|
|
41
|
-
| `description_lists` | Enable the `description-lists` extension
|
|
42
|
-
| `escape_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them
|
|
43
|
-
| `escape` | Escape raw HTML instead of clobbering it
|
|
44
|
-
| `figure_with_caption` | Render the image as a figure element with the title as its caption
|
|
45
|
-
| `footnotes` | Enable the `footnotes` extension
|
|
46
|
-
| `full_info_string` | Enable full info strings for code blocks
|
|
47
|
-
| `gemojis` | Enable the `gemojis` extensions - translate gemojis into UTF-8 characters
|
|
48
|
-
| `gfm_quirks` | Enables GFM-style quirks in output HTML, such as not nesting <strong> tags
|
|
49
|
-
| `github_pre_lang` | Use GitHub-style `<pre lang>` for code blocks
|
|
50
|
-
| `greentext` | Enable the `greentext` extension - requires at least one space after a `>` character to generate a blockquote, and restarts blockquote nesting across unique lines of input
|
|
51
|
-
| `hardbreaks` | Treat newlines as hard line breaks
|
|
52
|
-
| `header_accessibility` | Use new header/anchor combination in HTML output, per [!112](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/merge_requests/112).
|
|
53
|
-
| `
|
|
54
|
-
| `
|
|
55
|
-
| `
|
|
56
|
-
| `
|
|
57
|
-
| `
|
|
58
|
-
| `
|
|
59
|
-
| `
|
|
60
|
-
| `
|
|
61
|
-
| `
|
|
62
|
-
| `
|
|
63
|
-
| `
|
|
64
|
-
| `
|
|
65
|
-
| `
|
|
66
|
-
| `
|
|
67
|
-
| `
|
|
68
|
-
| `
|
|
69
|
-
| `
|
|
70
|
-
| `
|
|
71
|
-
| `
|
|
72
|
-
| `
|
|
73
|
-
| `
|
|
74
|
-
| `
|
|
75
|
-
| `
|
|
76
|
-
| `
|
|
77
|
-
| `
|
|
42
|
+
| Option name | Description |
|
|
43
|
+
|-------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
44
|
+
| `autolink` | Enable the `autolink` extension |
|
|
45
|
+
| `cjk_friendly_emphasis` | Enable the [`cjk_friendly_emphasis` extension](https://github.com/tats-u/markdown-cjk-friendly) |
|
|
46
|
+
| `default_html` | Disables any custom HTML, and returns default HTML from `comrak` |
|
|
47
|
+
| `description_lists` | Enable the `description-lists` extension |
|
|
48
|
+
| `escape_char_spans` | Wrap escaped characters in a `<span>` to allow any post-processing to recognize them |
|
|
49
|
+
| `escape` | Escape raw HTML instead of clobbering it |
|
|
50
|
+
| `figure_with_caption` | Render the image as a figure element with the title as its caption |
|
|
51
|
+
| `footnotes` | Enable the `footnotes` extension |
|
|
52
|
+
| `full_info_string` | Enable full info strings for code blocks |
|
|
53
|
+
| `gemojis` | Enable the `gemojis` extensions - translate gemojis into UTF-8 characters |
|
|
54
|
+
| `gfm_quirks` | Enables GFM-style quirks in output HTML, such as not nesting <strong> tags |
|
|
55
|
+
| `github_pre_lang` | Use GitHub-style `<pre lang>` for code blocks |
|
|
56
|
+
| `greentext` | Enable the `greentext` extension - requires at least one space after a `>` character to generate a blockquote, and restarts blockquote nesting across unique lines of input |
|
|
57
|
+
| `hardbreaks` | Treat newlines as hard line breaks |
|
|
58
|
+
| `header_accessibility` | Use new header/anchor combination in HTML output, per [!112](https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/merge_requests/112). Requires `header_id_prefix` to be set. |
|
|
59
|
+
| `header_id_prefix <PREFIX>` | Enable the `header-id` extension, with the given ID prefix |
|
|
60
|
+
| `header_slug_prefix <PREFIX>` | Prefix to prepend to heading anchor slugs. When set, slugs become `{header_slug_prefix}{anchorized_text}`. Requires `header_accessibility` to be set. |
|
|
61
|
+
| `ignore_empty_links` | Ignore empty links in input |
|
|
62
|
+
| `ignore_setext` | Ignore setext headings in input |
|
|
63
|
+
| `inapplicable_tasks` | Allow inapplicable tasks items. Must also set the `relaxed_tasklist_character` option. |
|
|
64
|
+
| `math_code` | Enables `math code` extension, using math code syntax |
|
|
65
|
+
| `math_dollars` | Enables `math dollars` extension, using math dollar syntax |
|
|
66
|
+
| `multiline_block_quotes` | Enable the `multiline-block-quotes` extension |
|
|
67
|
+
| `only_escape_chars <CHARS>` | When the 'escaped_char_spans' render option is enabled, only emit `<span data-escaped-char>` around the given characters. |
|
|
68
|
+
| `placeholder_detection` | Detect placeholder variables in the format `%{placeholder}` |
|
|
69
|
+
| `relaxed_autolinks` | Enable relaxing of autolink parsing, allowing links to be recognized when in brackets, with any scheme, and with dot-less hostnames |
|
|
70
|
+
| `relaxed_tasklist_character` | Enable relaxing which character is allowed in tasklists |
|
|
71
|
+
| `smart` | Use smart punctuation |
|
|
72
|
+
| `sourcepos` | Include source mappings in HTML attributes |
|
|
73
|
+
| `spoiler` | Enable the `spoiler` extension - use double vertical bars |
|
|
74
|
+
| `strikethrough` | Enable the `strikethrough` extension |
|
|
75
|
+
| `superscript` | Enable the `superscript` extension |
|
|
76
|
+
| `table` | Enable the `table` extension |
|
|
77
|
+
| `tagfilter` | Enable the `tagfilter` extension |
|
|
78
|
+
| `tasklist_classes` | Output classes on tasklist elements so that they can be styled with CSS |
|
|
79
|
+
| `tasklist_in_table` | Enables parsing tasklist items within tables when they're the only content of a table cell |
|
|
80
|
+
| `tasklist` | Enable the `tasklist` extension |
|
|
81
|
+
| `underline` | Enables the `underline` extension - use double underscores |
|
|
82
|
+
| `unsafe` | Allow raw HTML and dangerous URLs |
|
|
83
|
+
| `wikilinks_title_after_pipe` | Enable the `wikilinks_title_after_pipe` extension |
|
|
84
|
+
| `wikilinks_title_before_pipe` | Enable the `wikilinks_title_before_pipe` extension |
|
|
78
85
|
|
|
79
86
|
## Dingus / Demo
|
|
80
87
|
|
|
@@ -86,7 +93,7 @@ https://gitlab-org.gitlab.io/ruby/gems/gitlab-glfm-markdown
|
|
|
86
93
|
|
|
87
94
|
A command line executable can be built for debugging.
|
|
88
95
|
|
|
89
|
-
```
|
|
96
|
+
```sh
|
|
90
97
|
cargo run --bin gitlab-glfm-markdown --features="cli" -- --help
|
|
91
98
|
cargo run --bin gitlab-glfm-markdown --features="cli" -- --sourcepos
|
|
92
99
|
```
|
|
@@ -84,21 +84,19 @@ dependencies = [
|
|
|
84
84
|
|
|
85
85
|
[[package]]
|
|
86
86
|
name = "bindgen"
|
|
87
|
-
version = "0.
|
|
87
|
+
version = "0.72.1"
|
|
88
88
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
|
-
checksum = "
|
|
89
|
+
checksum = "993776b509cfb49c750f11b8f07a46fa23e0a1386ffc01fb1e7d343efc387895"
|
|
90
90
|
dependencies = [
|
|
91
91
|
"bitflags 2.9.1",
|
|
92
92
|
"cexpr",
|
|
93
93
|
"clang-sys",
|
|
94
94
|
"itertools",
|
|
95
|
-
"lazy_static",
|
|
96
|
-
"lazycell",
|
|
97
95
|
"proc-macro2",
|
|
98
96
|
"quote",
|
|
99
97
|
"regex",
|
|
100
98
|
"rustc-hash",
|
|
101
|
-
"shlex",
|
|
99
|
+
"shlex 1.3.0",
|
|
102
100
|
"syn",
|
|
103
101
|
]
|
|
104
102
|
|
|
@@ -140,11 +138,12 @@ dependencies = [
|
|
|
140
138
|
|
|
141
139
|
[[package]]
|
|
142
140
|
name = "cc"
|
|
143
|
-
version = "1.2.
|
|
141
|
+
version = "1.2.66"
|
|
144
142
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
145
|
-
checksum = "
|
|
143
|
+
checksum = "f5d6cac793997bd970000024b2934968efe83b382de4fdcf4fcb46b6ee4ad996"
|
|
146
144
|
dependencies = [
|
|
147
|
-
"
|
|
145
|
+
"find-msvc-tools",
|
|
146
|
+
"shlex 2.0.1",
|
|
148
147
|
]
|
|
149
148
|
|
|
150
149
|
[[package]]
|
|
@@ -221,17 +220,21 @@ checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75"
|
|
|
221
220
|
|
|
222
221
|
[[package]]
|
|
223
222
|
name = "comrak"
|
|
224
|
-
version = "0.
|
|
223
|
+
version = "0.53.0"
|
|
225
224
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
226
|
-
checksum = "
|
|
225
|
+
checksum = "9795cb30f4deefbf33488819707e0f9630535dd56208ec273c1b3f150196377a"
|
|
227
226
|
dependencies = [
|
|
228
227
|
"caseless",
|
|
229
228
|
"emojis",
|
|
230
229
|
"entities",
|
|
230
|
+
"finl_unicode",
|
|
231
231
|
"jetscii",
|
|
232
|
+
"phf",
|
|
233
|
+
"phf_codegen",
|
|
234
|
+
"rustc-hash",
|
|
235
|
+
"smallvec",
|
|
232
236
|
"syntect",
|
|
233
237
|
"typed-arena",
|
|
234
|
-
"unicode_categories",
|
|
235
238
|
]
|
|
236
239
|
|
|
237
240
|
[[package]]
|
|
@@ -260,9 +263,9 @@ checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
|
|
|
260
263
|
|
|
261
264
|
[[package]]
|
|
262
265
|
name = "emojis"
|
|
263
|
-
version = "0.
|
|
266
|
+
version = "0.8.2"
|
|
264
267
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
265
|
-
checksum = "
|
|
268
|
+
checksum = "0a4d5d50b0b58df5173d8ff1192b4d1422ceae5d981b30d4b6f8ed1d673a2bc4"
|
|
266
269
|
dependencies = [
|
|
267
270
|
"phf",
|
|
268
271
|
]
|
|
@@ -289,6 +292,24 @@ dependencies = [
|
|
|
289
292
|
"regex",
|
|
290
293
|
]
|
|
291
294
|
|
|
295
|
+
[[package]]
|
|
296
|
+
name = "fastrand"
|
|
297
|
+
version = "2.4.1"
|
|
298
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
299
|
+
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
|
300
|
+
|
|
301
|
+
[[package]]
|
|
302
|
+
name = "find-msvc-tools"
|
|
303
|
+
version = "0.1.9"
|
|
304
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
305
|
+
checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
|
|
306
|
+
|
|
307
|
+
[[package]]
|
|
308
|
+
name = "finl_unicode"
|
|
309
|
+
version = "1.4.0"
|
|
310
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
311
|
+
checksum = "9844ddc3a6e533d62bba727eb6c28b5d360921d5175e9ff0f1e621a5c590a4d5"
|
|
312
|
+
|
|
292
313
|
[[package]]
|
|
293
314
|
name = "flate2"
|
|
294
315
|
version = "1.1.2"
|
|
@@ -307,7 +328,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
|
|
|
307
328
|
|
|
308
329
|
[[package]]
|
|
309
330
|
name = "gitlab-glfm-markdown"
|
|
310
|
-
version = "0.0.
|
|
331
|
+
version = "0.0.42"
|
|
311
332
|
dependencies = [
|
|
312
333
|
"clap",
|
|
313
334
|
"comrak",
|
|
@@ -380,12 +401,6 @@ version = "1.5.0"
|
|
|
380
401
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
381
402
|
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
382
403
|
|
|
383
|
-
[[package]]
|
|
384
|
-
name = "lazycell"
|
|
385
|
-
version = "1.3.0"
|
|
386
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
387
|
-
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
388
|
-
|
|
389
404
|
[[package]]
|
|
390
405
|
name = "libc"
|
|
391
406
|
version = "0.2.174"
|
|
@@ -482,9 +497,9 @@ checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad"
|
|
|
482
497
|
|
|
483
498
|
[[package]]
|
|
484
499
|
name = "onig"
|
|
485
|
-
version = "6.5.
|
|
500
|
+
version = "6.5.3"
|
|
486
501
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
487
|
-
checksum = "
|
|
502
|
+
checksum = "0cc3cbf698f9438986c11a880c90a6d04b9de27575afd28bbf45b154b6c709e2"
|
|
488
503
|
dependencies = [
|
|
489
504
|
"bitflags 2.9.1",
|
|
490
505
|
"libc",
|
|
@@ -494,9 +509,9 @@ dependencies = [
|
|
|
494
509
|
|
|
495
510
|
[[package]]
|
|
496
511
|
name = "onig_sys"
|
|
497
|
-
version = "69.9.
|
|
512
|
+
version = "69.9.3"
|
|
498
513
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
499
|
-
checksum = "
|
|
514
|
+
checksum = "1e68317604e77e53b85896388e1a803c1d21b74c899ec9e5e1112db90735edd7"
|
|
500
515
|
dependencies = [
|
|
501
516
|
"cc",
|
|
502
517
|
"pkg-config",
|
|
@@ -504,27 +519,48 @@ dependencies = [
|
|
|
504
519
|
|
|
505
520
|
[[package]]
|
|
506
521
|
name = "phf"
|
|
507
|
-
version = "0.
|
|
522
|
+
version = "0.13.1"
|
|
523
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
524
|
+
checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"
|
|
525
|
+
dependencies = [
|
|
526
|
+
"phf_shared",
|
|
527
|
+
"serde",
|
|
528
|
+
]
|
|
529
|
+
|
|
530
|
+
[[package]]
|
|
531
|
+
name = "phf_codegen"
|
|
532
|
+
version = "0.13.1"
|
|
508
533
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
509
|
-
checksum = "
|
|
534
|
+
checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"
|
|
510
535
|
dependencies = [
|
|
536
|
+
"phf_generator",
|
|
537
|
+
"phf_shared",
|
|
538
|
+
]
|
|
539
|
+
|
|
540
|
+
[[package]]
|
|
541
|
+
name = "phf_generator"
|
|
542
|
+
version = "0.13.1"
|
|
543
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
544
|
+
checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"
|
|
545
|
+
dependencies = [
|
|
546
|
+
"fastrand",
|
|
511
547
|
"phf_shared",
|
|
512
548
|
]
|
|
513
549
|
|
|
514
550
|
[[package]]
|
|
515
551
|
name = "phf_shared"
|
|
516
|
-
version = "0.
|
|
552
|
+
version = "0.13.1"
|
|
517
553
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
518
|
-
checksum = "
|
|
554
|
+
checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"
|
|
519
555
|
dependencies = [
|
|
520
556
|
"siphasher",
|
|
521
557
|
]
|
|
522
558
|
|
|
523
559
|
[[package]]
|
|
524
560
|
name = "pkg-config"
|
|
525
|
-
version = "0.3.
|
|
561
|
+
version = "0.3.33"
|
|
526
562
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
527
|
-
checksum = "
|
|
563
|
+
checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e"
|
|
528
564
|
|
|
529
565
|
[[package]]
|
|
530
566
|
name = "plist"
|
|
@@ -574,18 +610,18 @@ dependencies = [
|
|
|
574
610
|
|
|
575
611
|
[[package]]
|
|
576
612
|
name = "rb-sys"
|
|
577
|
-
version = "0.9.
|
|
613
|
+
version = "0.9.128"
|
|
578
614
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
579
|
-
checksum = "
|
|
615
|
+
checksum = "45ca28513560e56cfb79a62b1fce363c73af170a182024ce880c77ee9429920a"
|
|
580
616
|
dependencies = [
|
|
581
617
|
"rb-sys-build",
|
|
582
618
|
]
|
|
583
619
|
|
|
584
620
|
[[package]]
|
|
585
621
|
name = "rb-sys-build"
|
|
586
|
-
version = "0.9.
|
|
622
|
+
version = "0.9.128"
|
|
587
623
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
588
|
-
checksum = "
|
|
624
|
+
checksum = "ce04b2c55eff3a21aaa623fcc655d94373238e72cac6b3e1a3641ff31649f99a"
|
|
589
625
|
dependencies = [
|
|
590
626
|
"bindgen",
|
|
591
627
|
"lazy_static",
|
|
@@ -633,9 +669,9 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
|
|
|
633
669
|
|
|
634
670
|
[[package]]
|
|
635
671
|
name = "rustc-hash"
|
|
636
|
-
version = "
|
|
672
|
+
version = "2.1.2"
|
|
637
673
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
638
|
-
checksum = "
|
|
674
|
+
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
|
639
675
|
|
|
640
676
|
[[package]]
|
|
641
677
|
name = "ryu"
|
|
@@ -713,12 +749,24 @@ version = "1.3.0"
|
|
|
713
749
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
714
750
|
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
715
751
|
|
|
752
|
+
[[package]]
|
|
753
|
+
name = "shlex"
|
|
754
|
+
version = "2.0.1"
|
|
755
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
756
|
+
checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"
|
|
757
|
+
|
|
716
758
|
[[package]]
|
|
717
759
|
name = "siphasher"
|
|
718
760
|
version = "1.0.1"
|
|
719
761
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
720
762
|
checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d"
|
|
721
763
|
|
|
764
|
+
[[package]]
|
|
765
|
+
name = "smallvec"
|
|
766
|
+
version = "1.15.2"
|
|
767
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
768
|
+
checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"
|
|
769
|
+
|
|
722
770
|
[[package]]
|
|
723
771
|
name = "strsim"
|
|
724
772
|
version = "0.10.0"
|
|
@@ -852,12 +900,6 @@ dependencies = [
|
|
|
852
900
|
"tinyvec",
|
|
853
901
|
]
|
|
854
902
|
|
|
855
|
-
[[package]]
|
|
856
|
-
name = "unicode_categories"
|
|
857
|
-
version = "0.1.1"
|
|
858
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
859
|
-
checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e"
|
|
860
|
-
|
|
861
903
|
[[package]]
|
|
862
904
|
name = "utf8parse"
|
|
863
905
|
version = "0.2.2"
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "gitlab-glfm-markdown"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.42"
|
|
4
4
|
edition = "2021"
|
|
5
5
|
authors = ["digitalmoksha <bwalker@gitlab.com>", "Asherah Connor <aconnor@gitlab.com>"]
|
|
6
|
-
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible.
|
|
6
|
+
description = "GitLab Flavored Markdown parser and formatter. 100% CommonMark-compatible."
|
|
7
7
|
publish = false
|
|
8
8
|
|
|
9
9
|
[lib]
|
|
@@ -15,7 +15,7 @@ required-features = ["cli"]
|
|
|
15
15
|
|
|
16
16
|
[dependencies]
|
|
17
17
|
clap = { version = "=4.4.18", optional = true, features = ["derive", "string"] }
|
|
18
|
-
comrak = { version = "0.
|
|
18
|
+
comrak = { version = "0.53.0", default-features = false, features = ["shortcodes"] }
|
|
19
19
|
magnus = "0.8.2"
|
|
20
20
|
rb-sys = { version = "0.9.124", default-features = false, features = ["stable-api-compiled-fallback"] }
|
|
21
21
|
regex = "1.11.1"
|
|
@@ -24,4 +24,4 @@ serde_magnus = "0.10.0"
|
|
|
24
24
|
serde = { version = "1.0.219", features = ["serde_derive"] }
|
|
25
25
|
|
|
26
26
|
[features]
|
|
27
|
-
cli = ["clap", "comrak/syntect"]
|
|
27
|
+
cli = ["clap", "comrak/syntect-onig"]
|
|
@@ -20,6 +20,7 @@ pub struct RenderUserData {
|
|
|
20
20
|
pub placeholder_detection: bool,
|
|
21
21
|
pub only_escape_chars: Option<Vec<char>>,
|
|
22
22
|
pub header_accessibility: bool,
|
|
23
|
+
pub header_slug_prefix: Option<String>,
|
|
23
24
|
|
|
24
25
|
last_heading: Option<String>,
|
|
25
26
|
}
|
|
@@ -32,6 +33,7 @@ impl From<&RenderOptions> for RenderUserData {
|
|
|
32
33
|
placeholder_detection: options.placeholder_detection,
|
|
33
34
|
only_escape_chars: options.only_escape_chars.clone(),
|
|
34
35
|
header_accessibility: options.header_accessibility,
|
|
36
|
+
header_slug_prefix: options.header_slug_prefix.clone(),
|
|
35
37
|
last_heading: None,
|
|
36
38
|
}
|
|
37
39
|
}
|
|
@@ -484,9 +486,14 @@ fn render_heading(
|
|
|
484
486
|
context.cr()?;
|
|
485
487
|
write!(context, "<h{}", nh.level)?;
|
|
486
488
|
|
|
487
|
-
if let Some(ref prefix) = context.options.extension.
|
|
489
|
+
if let Some(ref prefix) = context.options.extension.header_id_prefix {
|
|
488
490
|
let text_content = collect_text(node);
|
|
489
491
|
let id = context.anchorizer.anchorize(&text_content);
|
|
492
|
+
let id = if let Some(ref slug_prefix) = context.user.header_slug_prefix {
|
|
493
|
+
format!("{slug_prefix}{id}")
|
|
494
|
+
} else {
|
|
495
|
+
id
|
|
496
|
+
};
|
|
490
497
|
write!(context, r##" id="{prefix}{id}""##)?;
|
|
491
498
|
context.user.last_heading = Some(id);
|
|
492
499
|
}
|
|
@@ -494,7 +501,7 @@ fn render_heading(
|
|
|
494
501
|
render_sourcepos(context, node)?;
|
|
495
502
|
context.write_str(">")?;
|
|
496
503
|
} else {
|
|
497
|
-
if context.options.extension.
|
|
504
|
+
if context.options.extension.header_id_prefix.is_some() {
|
|
498
505
|
let id = context.user.last_heading.take().unwrap();
|
|
499
506
|
let text_content = collect_text(node);
|
|
500
507
|
write!(
|
|
@@ -27,8 +27,13 @@ pub struct RenderOptions {
|
|
|
27
27
|
pub hardbreaks: bool,
|
|
28
28
|
/// Use new header/anchor combination in HTML output, per
|
|
29
29
|
/// https://gitlab.com/gitlab-org/ruby/gems/gitlab-glfm-markdown/-/merge_requests/112.
|
|
30
|
+
/// Requires `header_id_prefix` to generate heading anchors.
|
|
30
31
|
pub header_accessibility: bool,
|
|
31
|
-
pub
|
|
32
|
+
pub header_id_prefix: Option<String>,
|
|
33
|
+
/// Prefix to prepend to heading anchor slugs.
|
|
34
|
+
/// When set, slugs become `{header_slug_prefix}{anchorized_text}`.
|
|
35
|
+
/// Requires `header_accessibility` to be set.
|
|
36
|
+
pub header_slug_prefix: Option<String>,
|
|
32
37
|
pub ignore_empty_links: bool,
|
|
33
38
|
pub ignore_setext: bool,
|
|
34
39
|
/// Detect inapplicable tasks (`- [~]`)
|
|
@@ -73,7 +78,7 @@ impl From<&RenderOptions> for comrak::Options<'_> {
|
|
|
73
78
|
comrak_options.extension.footnotes = options.footnotes;
|
|
74
79
|
// comrak_options.extension.front_matter_delimiter = options.front_matter_delimiter;
|
|
75
80
|
comrak_options.extension.greentext = options.greentext;
|
|
76
|
-
comrak_options.extension.
|
|
81
|
+
comrak_options.extension.header_id_prefix = options.header_id_prefix.clone();
|
|
77
82
|
comrak_options.extension.math_code = options.math_code;
|
|
78
83
|
comrak_options.extension.math_dollars = options.math_dollars;
|
|
79
84
|
comrak_options.extension.multiline_block_quotes = options.multiline_block_quotes;
|
|
@@ -89,9 +89,14 @@ struct Args {
|
|
|
89
89
|
#[arg(long)]
|
|
90
90
|
header_accessibility: bool,
|
|
91
91
|
|
|
92
|
-
/// Enable the 'header
|
|
92
|
+
/// Enable the 'header ID prefix' extension, with the given ID prefix
|
|
93
93
|
#[arg(long, value_name = "PREFIX")]
|
|
94
|
-
|
|
94
|
+
header_id_prefix: Option<String>,
|
|
95
|
+
|
|
96
|
+
/// Prefix to prepend to heading anchor slugs.
|
|
97
|
+
/// When set, slugs become `{header_slug_prefix}{anchorized_text}`.
|
|
98
|
+
#[arg(long, value_name = "PREFIX")]
|
|
99
|
+
header_slug_prefix: Option<String>,
|
|
95
100
|
|
|
96
101
|
/// Ignore empty links in input.
|
|
97
102
|
#[arg(long)]
|
|
@@ -233,7 +238,8 @@ fn main() {
|
|
|
233
238
|
greentext: cli.greentext,
|
|
234
239
|
hardbreaks: cli.hardbreaks,
|
|
235
240
|
header_accessibility: cli.header_accessibility,
|
|
236
|
-
|
|
241
|
+
header_id_prefix: cli.header_id_prefix,
|
|
242
|
+
header_slug_prefix: cli.header_slug_prefix,
|
|
237
243
|
ignore_empty_links: cli.ignore_empty_links,
|
|
238
244
|
ignore_setext: cli.ignore_setext,
|
|
239
245
|
inapplicable_tasks: cli.inapplicable_tasks,
|
|
Binary file
|
|
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.42
|
|
5
5
|
platform: x86_64-linux-gnu
|
|
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: 2026-
|
|
12
|
+
date: 2026-07-08 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rb_sys
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - "~>"
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 0.9.
|
|
20
|
+
version: 0.9.128
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - "~>"
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 0.9.
|
|
27
|
+
version: 0.9.128
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: rake
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|