commonmarker 2.6.1 → 2.6.2
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 +90 -81
- data/ext/commonmarker/Cargo.toml +1 -0
- data/ext/commonmarker/src/lib.rs +55 -12
- data/ext/commonmarker/src/utils.rs +1 -4
- data/lib/commonmarker/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5ab93426a13e5c6c696a2d491e4c72e52e58fa8594f0369f84e77c26a1135f16
|
|
4
|
+
data.tar.gz: b11b4caf5a61cd7d048a6997e09d85db92f913d1362f64e95f6cb88204edab5a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '08dedde53445b5a145a7ecd49c32ce9c3ec0549169f57e35a687c06e10195c449f7affe263f96d32b73b3f863ecccf308fe099410e744da210b27fde7867bafd'
|
|
7
|
+
data.tar.gz: bbae839d659fa99a6d11914edc7ef59a3c87aca264595e14e1a468614a0d845265052c8ae51318898275edd4a5bcc70990cf372c3c8bc70c0b0b4277029736f2
|
data/Cargo.lock
CHANGED
|
@@ -49,22 +49,22 @@ dependencies = [
|
|
|
49
49
|
|
|
50
50
|
[[package]]
|
|
51
51
|
name = "anstyle-query"
|
|
52
|
-
version = "1.1.
|
|
52
|
+
version = "1.1.5"
|
|
53
53
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
54
|
-
checksum = "
|
|
54
|
+
checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
|
|
55
55
|
dependencies = [
|
|
56
|
-
"windows-sys 0.
|
|
56
|
+
"windows-sys 0.61.2",
|
|
57
57
|
]
|
|
58
58
|
|
|
59
59
|
[[package]]
|
|
60
60
|
name = "anstyle-wincon"
|
|
61
|
-
version = "3.0.
|
|
61
|
+
version = "3.0.11"
|
|
62
62
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
63
|
-
checksum = "
|
|
63
|
+
checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
|
|
64
64
|
dependencies = [
|
|
65
65
|
"anstyle",
|
|
66
66
|
"once_cell_polyfill",
|
|
67
|
-
"windows-sys 0.
|
|
67
|
+
"windows-sys 0.61.2",
|
|
68
68
|
]
|
|
69
69
|
|
|
70
70
|
[[package]]
|
|
@@ -125,9 +125,9 @@ checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
|
|
|
125
125
|
|
|
126
126
|
[[package]]
|
|
127
127
|
name = "bon"
|
|
128
|
-
version = "3.8.
|
|
128
|
+
version = "3.8.2"
|
|
129
129
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
130
|
-
checksum = "
|
|
130
|
+
checksum = "234655ec178edd82b891e262ea7cf71f6584bcd09eff94db786be23f1821825c"
|
|
131
131
|
dependencies = [
|
|
132
132
|
"bon-macros",
|
|
133
133
|
"rustversion",
|
|
@@ -135,9 +135,9 @@ dependencies = [
|
|
|
135
135
|
|
|
136
136
|
[[package]]
|
|
137
137
|
name = "bon-macros"
|
|
138
|
-
version = "3.8.
|
|
138
|
+
version = "3.8.2"
|
|
139
139
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
140
|
-
checksum = "
|
|
140
|
+
checksum = "89ec27229c38ed0eb3c0feee3d2c1d6a4379ae44f418a29a658890e062d8f365"
|
|
141
141
|
dependencies = [
|
|
142
142
|
"darling",
|
|
143
143
|
"ident_case",
|
|
@@ -159,9 +159,9 @@ dependencies = [
|
|
|
159
159
|
|
|
160
160
|
[[package]]
|
|
161
161
|
name = "cc"
|
|
162
|
-
version = "1.2.
|
|
162
|
+
version = "1.2.53"
|
|
163
163
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
164
|
-
checksum = "
|
|
164
|
+
checksum = "755d2fce177175ffca841e9a06afdb2c4ab0f593d53b4dee48147dfaade85932"
|
|
165
165
|
dependencies = [
|
|
166
166
|
"find-msvc-tools",
|
|
167
167
|
"shlex",
|
|
@@ -195,9 +195,9 @@ dependencies = [
|
|
|
195
195
|
|
|
196
196
|
[[package]]
|
|
197
197
|
name = "clap"
|
|
198
|
-
version = "4.5.
|
|
198
|
+
version = "4.5.54"
|
|
199
199
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
200
|
-
checksum = "
|
|
200
|
+
checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394"
|
|
201
201
|
dependencies = [
|
|
202
202
|
"clap_builder",
|
|
203
203
|
"clap_derive",
|
|
@@ -205,9 +205,9 @@ dependencies = [
|
|
|
205
205
|
|
|
206
206
|
[[package]]
|
|
207
207
|
name = "clap_builder"
|
|
208
|
-
version = "4.5.
|
|
208
|
+
version = "4.5.54"
|
|
209
209
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
210
|
-
checksum = "
|
|
210
|
+
checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00"
|
|
211
211
|
dependencies = [
|
|
212
212
|
"anstream",
|
|
213
213
|
"anstyle",
|
|
@@ -230,9 +230,9 @@ dependencies = [
|
|
|
230
230
|
|
|
231
231
|
[[package]]
|
|
232
232
|
name = "clap_lex"
|
|
233
|
-
version = "0.7.
|
|
233
|
+
version = "0.7.7"
|
|
234
234
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
235
|
-
checksum = "
|
|
235
|
+
checksum = "c3e64b0cc0439b12df2fa678eae89a1c56a529fd067a9115f7827f1fffd22b32"
|
|
236
236
|
|
|
237
237
|
[[package]]
|
|
238
238
|
name = "colorchoice"
|
|
@@ -246,6 +246,7 @@ version = "1.0.0"
|
|
|
246
246
|
dependencies = [
|
|
247
247
|
"comrak",
|
|
248
248
|
"magnus",
|
|
249
|
+
"rb-allocator",
|
|
249
250
|
"rb-sys",
|
|
250
251
|
"rctree",
|
|
251
252
|
"syntect",
|
|
@@ -283,9 +284,9 @@ dependencies = [
|
|
|
283
284
|
|
|
284
285
|
[[package]]
|
|
285
286
|
name = "darling"
|
|
286
|
-
version = "0.
|
|
287
|
+
version = "0.23.0"
|
|
287
288
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
288
|
-
checksum = "
|
|
289
|
+
checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"
|
|
289
290
|
dependencies = [
|
|
290
291
|
"darling_core",
|
|
291
292
|
"darling_macro",
|
|
@@ -293,11 +294,10 @@ dependencies = [
|
|
|
293
294
|
|
|
294
295
|
[[package]]
|
|
295
296
|
name = "darling_core"
|
|
296
|
-
version = "0.
|
|
297
|
+
version = "0.23.0"
|
|
297
298
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
298
|
-
checksum = "
|
|
299
|
+
checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"
|
|
299
300
|
dependencies = [
|
|
300
|
-
"fnv",
|
|
301
301
|
"ident_case",
|
|
302
302
|
"proc-macro2",
|
|
303
303
|
"quote",
|
|
@@ -307,9 +307,9 @@ dependencies = [
|
|
|
307
307
|
|
|
308
308
|
[[package]]
|
|
309
309
|
name = "darling_macro"
|
|
310
|
-
version = "0.
|
|
310
|
+
version = "0.23.0"
|
|
311
311
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
312
|
-
checksum = "
|
|
312
|
+
checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"
|
|
313
313
|
dependencies = [
|
|
314
314
|
"darling_core",
|
|
315
315
|
"quote",
|
|
@@ -375,15 +375,15 @@ dependencies = [
|
|
|
375
375
|
|
|
376
376
|
[[package]]
|
|
377
377
|
name = "find-msvc-tools"
|
|
378
|
-
version = "0.1.
|
|
378
|
+
version = "0.1.8"
|
|
379
379
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
380
|
-
checksum = "
|
|
380
|
+
checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
|
|
381
381
|
|
|
382
382
|
[[package]]
|
|
383
383
|
name = "flate2"
|
|
384
|
-
version = "1.1.
|
|
384
|
+
version = "1.1.8"
|
|
385
385
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
386
|
-
checksum = "
|
|
386
|
+
checksum = "b375d6465b98090a5f25b1c7703f3859783755aa9a80433b36e0379a3ec2f369"
|
|
387
387
|
dependencies = [
|
|
388
388
|
"crc32fast",
|
|
389
389
|
"miniz_oxide",
|
|
@@ -409,9 +409,9 @@ checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280"
|
|
|
409
409
|
|
|
410
410
|
[[package]]
|
|
411
411
|
name = "hashbrown"
|
|
412
|
-
version = "0.16.
|
|
412
|
+
version = "0.16.1"
|
|
413
413
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
414
|
-
checksum = "
|
|
414
|
+
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
|
|
415
415
|
|
|
416
416
|
[[package]]
|
|
417
417
|
name = "heck"
|
|
@@ -427,9 +427,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
|
|
|
427
427
|
|
|
428
428
|
[[package]]
|
|
429
429
|
name = "indexmap"
|
|
430
|
-
version = "2.
|
|
430
|
+
version = "2.13.0"
|
|
431
431
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
432
|
-
checksum = "
|
|
432
|
+
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
|
|
433
433
|
dependencies = [
|
|
434
434
|
"equivalent",
|
|
435
435
|
"hashbrown",
|
|
@@ -452,9 +452,9 @@ dependencies = [
|
|
|
452
452
|
|
|
453
453
|
[[package]]
|
|
454
454
|
name = "itoa"
|
|
455
|
-
version = "1.0.
|
|
455
|
+
version = "1.0.17"
|
|
456
456
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
457
|
-
checksum = "
|
|
457
|
+
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
|
|
458
458
|
|
|
459
459
|
[[package]]
|
|
460
460
|
name = "jetscii"
|
|
@@ -476,9 +476,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
|
|
476
476
|
|
|
477
477
|
[[package]]
|
|
478
478
|
name = "libc"
|
|
479
|
-
version = "0.2.
|
|
479
|
+
version = "0.2.180"
|
|
480
480
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
481
|
-
checksum = "
|
|
481
|
+
checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
|
|
482
482
|
|
|
483
483
|
[[package]]
|
|
484
484
|
name = "libloading"
|
|
@@ -652,45 +652,54 @@ dependencies = [
|
|
|
652
652
|
|
|
653
653
|
[[package]]
|
|
654
654
|
name = "proc-macro2"
|
|
655
|
-
version = "1.0.
|
|
655
|
+
version = "1.0.105"
|
|
656
656
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
657
|
-
checksum = "
|
|
657
|
+
checksum = "535d180e0ecab6268a3e718bb9fd44db66bbbc256257165fc699dadf70d16fe7"
|
|
658
658
|
dependencies = [
|
|
659
659
|
"unicode-ident",
|
|
660
660
|
]
|
|
661
661
|
|
|
662
662
|
[[package]]
|
|
663
663
|
name = "quick-xml"
|
|
664
|
-
version = "0.38.
|
|
664
|
+
version = "0.38.4"
|
|
665
665
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
666
|
-
checksum = "
|
|
666
|
+
checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c"
|
|
667
667
|
dependencies = [
|
|
668
668
|
"memchr",
|
|
669
669
|
]
|
|
670
670
|
|
|
671
671
|
[[package]]
|
|
672
672
|
name = "quote"
|
|
673
|
-
version = "1.0.
|
|
673
|
+
version = "1.0.43"
|
|
674
674
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
675
|
-
checksum = "
|
|
675
|
+
checksum = "dc74d9a594b72ae6656596548f56f667211f8a97b3d4c3d467150794690dc40a"
|
|
676
676
|
dependencies = [
|
|
677
677
|
"proc-macro2",
|
|
678
678
|
]
|
|
679
679
|
|
|
680
|
+
[[package]]
|
|
681
|
+
name = "rb-allocator"
|
|
682
|
+
version = "0.9.6"
|
|
683
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
684
|
+
checksum = "77d15b8f85c6140fa4c318740b1408466f091d4f55062a1729f1d3fc2417428b"
|
|
685
|
+
dependencies = [
|
|
686
|
+
"rb-sys",
|
|
687
|
+
]
|
|
688
|
+
|
|
680
689
|
[[package]]
|
|
681
690
|
name = "rb-sys"
|
|
682
|
-
version = "0.9.
|
|
691
|
+
version = "0.9.124"
|
|
683
692
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
684
|
-
checksum = "
|
|
693
|
+
checksum = "c85c4188462601e2aa1469def389c17228566f82ea72f137ed096f21591bc489"
|
|
685
694
|
dependencies = [
|
|
686
695
|
"rb-sys-build",
|
|
687
696
|
]
|
|
688
697
|
|
|
689
698
|
[[package]]
|
|
690
699
|
name = "rb-sys-build"
|
|
691
|
-
version = "0.9.
|
|
700
|
+
version = "0.9.124"
|
|
692
701
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
693
|
-
checksum = "
|
|
702
|
+
checksum = "568068db4102230882e6d4ae8de6632e224ca75fe5970f6e026a04e91ed635d3"
|
|
694
703
|
dependencies = [
|
|
695
704
|
"bindgen",
|
|
696
705
|
"lazy_static",
|
|
@@ -703,9 +712,9 @@ dependencies = [
|
|
|
703
712
|
|
|
704
713
|
[[package]]
|
|
705
714
|
name = "rb-sys-env"
|
|
706
|
-
version = "0.2.
|
|
715
|
+
version = "0.2.3"
|
|
707
716
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
708
|
-
checksum = "
|
|
717
|
+
checksum = "cca7ad6a7e21e72151d56fe2495a259b5670e204c3adac41ee7ef676ea08117a"
|
|
709
718
|
|
|
710
719
|
[[package]]
|
|
711
720
|
name = "rctree"
|
|
@@ -750,9 +759,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
|
750
759
|
|
|
751
760
|
[[package]]
|
|
752
761
|
name = "rustix"
|
|
753
|
-
version = "1.1.
|
|
762
|
+
version = "1.1.3"
|
|
754
763
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
755
|
-
checksum = "
|
|
764
|
+
checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
|
|
756
765
|
dependencies = [
|
|
757
766
|
"bitflags",
|
|
758
767
|
"errno",
|
|
@@ -767,12 +776,6 @@ version = "1.0.22"
|
|
|
767
776
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
768
777
|
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
769
778
|
|
|
770
|
-
[[package]]
|
|
771
|
-
name = "ryu"
|
|
772
|
-
version = "1.0.20"
|
|
773
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
774
|
-
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
|
775
|
-
|
|
776
779
|
[[package]]
|
|
777
780
|
name = "same-file"
|
|
778
781
|
version = "1.0.6"
|
|
@@ -819,22 +822,22 @@ dependencies = [
|
|
|
819
822
|
|
|
820
823
|
[[package]]
|
|
821
824
|
name = "serde_json"
|
|
822
|
-
version = "1.0.
|
|
825
|
+
version = "1.0.149"
|
|
823
826
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
824
|
-
checksum = "
|
|
827
|
+
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
|
|
825
828
|
dependencies = [
|
|
826
829
|
"itoa",
|
|
827
830
|
"memchr",
|
|
828
|
-
"ryu",
|
|
829
831
|
"serde",
|
|
830
832
|
"serde_core",
|
|
833
|
+
"zmij",
|
|
831
834
|
]
|
|
832
835
|
|
|
833
836
|
[[package]]
|
|
834
837
|
name = "shell-words"
|
|
835
|
-
version = "1.1.
|
|
838
|
+
version = "1.1.1"
|
|
836
839
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
837
|
-
checksum = "
|
|
840
|
+
checksum = "dc6fe69c597f9c37bfeeeeeb33da3530379845f10be461a66d16d03eca2ded77"
|
|
838
841
|
|
|
839
842
|
[[package]]
|
|
840
843
|
name = "shlex"
|
|
@@ -844,9 +847,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
|
844
847
|
|
|
845
848
|
[[package]]
|
|
846
849
|
name = "simd-adler32"
|
|
847
|
-
version = "0.3.
|
|
850
|
+
version = "0.3.8"
|
|
848
851
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
849
|
-
checksum = "
|
|
852
|
+
checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
|
|
850
853
|
|
|
851
854
|
[[package]]
|
|
852
855
|
name = "siphasher"
|
|
@@ -862,9 +865,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"
|
|
|
862
865
|
|
|
863
866
|
[[package]]
|
|
864
867
|
name = "syn"
|
|
865
|
-
version = "2.0.
|
|
868
|
+
version = "2.0.114"
|
|
866
869
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
867
|
-
checksum = "
|
|
870
|
+
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
|
|
868
871
|
dependencies = [
|
|
869
872
|
"proc-macro2",
|
|
870
873
|
"quote",
|
|
@@ -905,18 +908,18 @@ dependencies = [
|
|
|
905
908
|
|
|
906
909
|
[[package]]
|
|
907
910
|
name = "thiserror"
|
|
908
|
-
version = "2.0.
|
|
911
|
+
version = "2.0.18"
|
|
909
912
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
910
|
-
checksum = "
|
|
913
|
+
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
|
|
911
914
|
dependencies = [
|
|
912
915
|
"thiserror-impl",
|
|
913
916
|
]
|
|
914
917
|
|
|
915
918
|
[[package]]
|
|
916
919
|
name = "thiserror-impl"
|
|
917
|
-
version = "2.0.
|
|
920
|
+
version = "2.0.18"
|
|
918
921
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
919
|
-
checksum = "
|
|
922
|
+
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
|
|
920
923
|
dependencies = [
|
|
921
924
|
"proc-macro2",
|
|
922
925
|
"quote",
|
|
@@ -925,30 +928,30 @@ dependencies = [
|
|
|
925
928
|
|
|
926
929
|
[[package]]
|
|
927
930
|
name = "time"
|
|
928
|
-
version = "0.3.
|
|
931
|
+
version = "0.3.45"
|
|
929
932
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
930
|
-
checksum = "
|
|
933
|
+
checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd"
|
|
931
934
|
dependencies = [
|
|
932
935
|
"deranged",
|
|
933
936
|
"itoa",
|
|
934
937
|
"num-conv",
|
|
935
938
|
"powerfmt",
|
|
936
|
-
"
|
|
939
|
+
"serde_core",
|
|
937
940
|
"time-core",
|
|
938
941
|
"time-macros",
|
|
939
942
|
]
|
|
940
943
|
|
|
941
944
|
[[package]]
|
|
942
945
|
name = "time-core"
|
|
943
|
-
version = "0.1.
|
|
946
|
+
version = "0.1.7"
|
|
944
947
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
945
|
-
checksum = "
|
|
948
|
+
checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca"
|
|
946
949
|
|
|
947
950
|
[[package]]
|
|
948
951
|
name = "time-macros"
|
|
949
|
-
version = "0.2.
|
|
952
|
+
version = "0.2.25"
|
|
950
953
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
951
|
-
checksum = "
|
|
954
|
+
checksum = "71e552d1249bf61ac2a52db88179fd0673def1e1ad8243a00d9ec9ed71fee3dd"
|
|
952
955
|
dependencies = [
|
|
953
956
|
"num-conv",
|
|
954
957
|
"time-core",
|
|
@@ -977,15 +980,15 @@ checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
|
|
|
977
980
|
|
|
978
981
|
[[package]]
|
|
979
982
|
name = "unicode-ident"
|
|
980
|
-
version = "1.0.
|
|
983
|
+
version = "1.0.22"
|
|
981
984
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
982
|
-
checksum = "
|
|
985
|
+
checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
|
|
983
986
|
|
|
984
987
|
[[package]]
|
|
985
988
|
name = "unicode-normalization"
|
|
986
|
-
version = "0.1.
|
|
989
|
+
version = "0.1.25"
|
|
987
990
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
988
|
-
checksum = "
|
|
991
|
+
checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8"
|
|
989
992
|
dependencies = [
|
|
990
993
|
"tinyvec",
|
|
991
994
|
]
|
|
@@ -1124,3 +1127,9 @@ checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85"
|
|
|
1124
1127
|
dependencies = [
|
|
1125
1128
|
"linked-hash-map",
|
|
1126
1129
|
]
|
|
1130
|
+
|
|
1131
|
+
[[package]]
|
|
1132
|
+
name = "zmij"
|
|
1133
|
+
version = "1.0.15"
|
|
1134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1135
|
+
checksum = "94f63c051f4fe3c1509da62131a678643c5b6fbdc9273b2b79d4378ebda003d2"
|
data/ext/commonmarker/Cargo.toml
CHANGED
data/ext/commonmarker/src/lib.rs
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
extern crate core;
|
|
2
2
|
|
|
3
|
-
use
|
|
4
|
-
|
|
3
|
+
use std::fmt::{self, Write};
|
|
4
|
+
|
|
5
|
+
use comrak::parse_document;
|
|
6
|
+
use magnus::{function, scan_args, RHash, RString, Ruby, Value};
|
|
5
7
|
use node::CommonmarkerNode;
|
|
6
8
|
use plugins::syntax_highlighting::construct_syntax_highlighter_from_plugin;
|
|
7
9
|
|
|
@@ -9,6 +11,7 @@ mod options;
|
|
|
9
11
|
|
|
10
12
|
mod plugins;
|
|
11
13
|
|
|
14
|
+
use rb_allocator::ruby_global_allocator;
|
|
12
15
|
use typed_arena::Arena;
|
|
13
16
|
|
|
14
17
|
use crate::options::{iterate_extension_options, iterate_parse_options, iterate_render_options};
|
|
@@ -18,9 +21,32 @@ mod utils;
|
|
|
18
21
|
|
|
19
22
|
pub const EMPTY_STR: &str = "";
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
// Inform Ruby's GC about memory allocations.
|
|
25
|
+
ruby_global_allocator!();
|
|
26
|
+
|
|
27
|
+
/// A writer that writes directly to a Ruby String, avoiding intermediate Rust allocations.
|
|
28
|
+
struct RStringWriter(RString);
|
|
29
|
+
|
|
30
|
+
impl Write for RStringWriter {
|
|
31
|
+
fn write_str(&mut self, s: &str) -> fmt::Result {
|
|
32
|
+
self.0.cat(s);
|
|
33
|
+
Ok(())
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
fn commonmark_parse(ruby: &Ruby, args: &[Value]) -> Result<CommonmarkerNode, magnus::Error> {
|
|
22
38
|
let args = scan_args::scan_args::<_, (), (), (), _, ()>(args)?;
|
|
23
|
-
let (rb_commonmark,): (
|
|
39
|
+
let (rb_commonmark,): (RString,) = args.required;
|
|
40
|
+
|
|
41
|
+
// SAFETY: We hold the GVL and rb_commonmark won't be modified until we return
|
|
42
|
+
let commonmark_str = unsafe {
|
|
43
|
+
rb_commonmark.as_str().map_err(|e| {
|
|
44
|
+
magnus::Error::new(
|
|
45
|
+
ruby.exception_encoding_error(),
|
|
46
|
+
format!("invalid UTF-8: {}", e),
|
|
47
|
+
)
|
|
48
|
+
})?
|
|
49
|
+
};
|
|
24
50
|
|
|
25
51
|
let kwargs = scan_args::get_kwargs::<_, (), (Option<RHash>, Option<RHash>, Option<RHash>), ()>(
|
|
26
52
|
args.keywords,
|
|
@@ -50,14 +76,24 @@ fn commonmark_parse(args: &[Value]) -> Result<CommonmarkerNode, magnus::Error> {
|
|
|
50
76
|
};
|
|
51
77
|
|
|
52
78
|
let arena = Arena::new();
|
|
53
|
-
let root = parse_document(&arena,
|
|
79
|
+
let root = parse_document(&arena, commonmark_str, &comrak_options);
|
|
54
80
|
|
|
55
81
|
CommonmarkerNode::new_from_comrak_node(root)
|
|
56
82
|
}
|
|
57
83
|
|
|
58
|
-
fn commonmark_to_html(ruby: &Ruby, args: &[Value]) -> Result<
|
|
84
|
+
fn commonmark_to_html(ruby: &Ruby, args: &[Value]) -> Result<RString, magnus::Error> {
|
|
59
85
|
let args = scan_args::scan_args::<_, (), (), (), _, ()>(args)?;
|
|
60
|
-
let (rb_commonmark,): (
|
|
86
|
+
let (rb_commonmark,): (RString,) = args.required;
|
|
87
|
+
|
|
88
|
+
// SAFETY: We hold the GVL and rb_commonmark won't be modified until we return
|
|
89
|
+
let commonmark_str = unsafe {
|
|
90
|
+
rb_commonmark.as_str().map_err(|e| {
|
|
91
|
+
magnus::Error::new(
|
|
92
|
+
ruby.exception_encoding_error(),
|
|
93
|
+
format!("invalid UTF-8: {}", e),
|
|
94
|
+
)
|
|
95
|
+
})?
|
|
96
|
+
};
|
|
61
97
|
|
|
62
98
|
let kwargs = scan_args::get_kwargs::<
|
|
63
99
|
_,
|
|
@@ -104,11 +140,18 @@ fn commonmark_to_html(ruby: &Ruby, args: &[Value]) -> Result<String, magnus::Err
|
|
|
104
140
|
extension: comrak_extension_options,
|
|
105
141
|
};
|
|
106
142
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
143
|
+
// Pre-allocate Ruby string with estimated capacity (assume HTML is typically 2x commonmark size)
|
|
144
|
+
let output = ruby.str_with_capacity(commonmark_str.len() * 2);
|
|
145
|
+
let mut writer = RStringWriter(output);
|
|
146
|
+
|
|
147
|
+
// Parse and render directly to Ruby string, avoiding intermediate Rust String allocation
|
|
148
|
+
let arena = Arena::new();
|
|
149
|
+
let root = parse_document(&arena, commonmark_str, &comrak_options);
|
|
150
|
+
|
|
151
|
+
comrak::html::format_document_with_plugins(root, &comrak_options, &mut writer, &comrak_plugins)
|
|
152
|
+
.map_err(|e| magnus::Error::new(ruby.exception_runtime_error(), e.to_string()))?;
|
|
153
|
+
|
|
154
|
+
Ok(output)
|
|
112
155
|
}
|
|
113
156
|
|
|
114
157
|
#[magnus::init]
|
data/lib/commonmarker/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: commonmarker
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.6.
|
|
4
|
+
version: 2.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Garen Torikian
|
|
8
8
|
- Ashe Connor
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-01-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
106
106
|
- !ruby/object:Gem::Version
|
|
107
107
|
version: '3.4'
|
|
108
108
|
requirements: []
|
|
109
|
-
rubygems_version:
|
|
109
|
+
rubygems_version: 3.6.2
|
|
110
110
|
specification_version: 4
|
|
111
111
|
summary: CommonMark parser and renderer. Written in Rust, wrapped in Ruby.
|
|
112
112
|
test_files: []
|