commonmarker 2.6.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c0d53db7532f2e15af4e45360f4a5644452fcdc2a9ae93d0a89290faf37742e3
4
- data.tar.gz: 6e54103b315211f57d69de5ea86687fbcae29ed1913c8ac73f9ffeb6af727930
3
+ metadata.gz: 5ab93426a13e5c6c696a2d491e4c72e52e58fa8594f0369f84e77c26a1135f16
4
+ data.tar.gz: b11b4caf5a61cd7d048a6997e09d85db92f913d1362f64e95f6cb88204edab5a
5
5
  SHA512:
6
- metadata.gz: 42a13a30f53976ab5c835cbed577b340786d667b18da373d1e65383f17f23a7a66d46f3d0bfcf9497cccd6f594cf5c747aff89bceec38ddcb5be3e2065cc64b2
7
- data.tar.gz: 34b8e52ef7e46fb63f9b9689a22a4b5358f73bc1c5734365d9501e1e56a5bbf80837fbfd93db4b81b94f87d01179071dd55fc3ffdd2ebc3156f30b152b719f85
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.4"
52
+ version = "1.1.5"
53
53
  source = "registry+https://github.com/rust-lang/crates.io-index"
54
- checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2"
54
+ checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"
55
55
  dependencies = [
56
- "windows-sys 0.60.2",
56
+ "windows-sys 0.61.2",
57
57
  ]
58
58
 
59
59
  [[package]]
60
60
  name = "anstyle-wincon"
61
- version = "3.0.10"
61
+ version = "3.0.11"
62
62
  source = "registry+https://github.com/rust-lang/crates.io-index"
63
- checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a"
63
+ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"
64
64
  dependencies = [
65
65
  "anstyle",
66
66
  "once_cell_polyfill",
67
- "windows-sys 0.60.2",
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.1"
128
+ version = "3.8.2"
129
129
  source = "registry+https://github.com/rust-lang/crates.io-index"
130
- checksum = "ebeb9aaf9329dff6ceb65c689ca3db33dbf15f324909c60e4e5eef5701ce31b1"
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.1"
138
+ version = "3.8.2"
139
139
  source = "registry+https://github.com/rust-lang/crates.io-index"
140
- checksum = "77e9d642a7e3a318e37c2c9427b5a6a48aa1ad55dcd986f3034ab2239045a645"
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.43"
162
+ version = "1.2.53"
163
163
  source = "registry+https://github.com/rust-lang/crates.io-index"
164
- checksum = "739eb0f94557554b3ca9a86d2d37bebd49c5e6d0c1d2bda35ba5bdac830befc2"
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.51"
198
+ version = "4.5.54"
199
199
  source = "registry+https://github.com/rust-lang/crates.io-index"
200
- checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5"
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.51"
208
+ version = "4.5.54"
209
209
  source = "registry+https://github.com/rust-lang/crates.io-index"
210
- checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a"
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.6"
233
+ version = "0.7.7"
234
234
  source = "registry+https://github.com/rust-lang/crates.io-index"
235
- checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
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",
@@ -254,9 +255,9 @@ dependencies = [
254
255
 
255
256
  [[package]]
256
257
  name = "comrak"
257
- version = "0.48.0"
258
+ version = "0.49.0"
258
259
  source = "registry+https://github.com/rust-lang/crates.io-index"
259
- checksum = "48bf2260aceee247c6c5639f5751dc635211895066d782d2a28fb87f2e0d5613"
260
+ checksum = "ab87129dce2f2d7e75e753b1df0e5093b27dec8fa5970b6eb51280faacb25bd6"
260
261
  dependencies = [
261
262
  "bon",
262
263
  "caseless",
@@ -283,9 +284,9 @@ dependencies = [
283
284
 
284
285
  [[package]]
285
286
  name = "darling"
286
- version = "0.21.3"
287
+ version = "0.23.0"
287
288
  source = "registry+https://github.com/rust-lang/crates.io-index"
288
- checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0"
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.21.3"
297
+ version = "0.23.0"
297
298
  source = "registry+https://github.com/rust-lang/crates.io-index"
298
- checksum = "1247195ecd7e3c85f83c8d2a366e4210d588e802133e1e355180a9870b517ea4"
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.21.3"
310
+ version = "0.23.0"
311
311
  source = "registry+https://github.com/rust-lang/crates.io-index"
312
- checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81"
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.4"
378
+ version = "0.1.8"
379
379
  source = "registry+https://github.com/rust-lang/crates.io-index"
380
- checksum = "52051878f80a721bb68ebfbc930e07b65ba72f2da88968ea5c06fd6ca3d3a127"
380
+ checksum = "8591b0bcc8a98a64310a2fae1bb3e9b8564dd10e381e6e28010fde8e8e8568db"
381
381
 
382
382
  [[package]]
383
383
  name = "flate2"
384
- version = "1.1.5"
384
+ version = "1.1.8"
385
385
  source = "registry+https://github.com/rust-lang/crates.io-index"
386
- checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb"
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.0"
412
+ version = "0.16.1"
413
413
  source = "registry+https://github.com/rust-lang/crates.io-index"
414
- checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
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.12.0"
430
+ version = "2.13.0"
431
431
  source = "registry+https://github.com/rust-lang/crates.io-index"
432
- checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
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.15"
455
+ version = "1.0.17"
456
456
  source = "registry+https://github.com/rust-lang/crates.io-index"
457
- checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
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.177"
479
+ version = "0.2.180"
480
480
  source = "registry+https://github.com/rust-lang/crates.io-index"
481
- checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
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.103"
655
+ version = "1.0.105"
656
656
  source = "registry+https://github.com/rust-lang/crates.io-index"
657
- checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
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.3"
664
+ version = "0.38.4"
665
665
  source = "registry+https://github.com/rust-lang/crates.io-index"
666
- checksum = "42a232e7487fc2ef313d96dde7948e7a3c05101870d8985e4fd8d26aedd27b89"
666
+ checksum = "b66c2058c55a409d601666cffe35f04333cf1013010882cec174a7467cd4e21c"
667
667
  dependencies = [
668
668
  "memchr",
669
669
  ]
670
670
 
671
671
  [[package]]
672
672
  name = "quote"
673
- version = "1.0.41"
673
+ version = "1.0.43"
674
674
  source = "registry+https://github.com/rust-lang/crates.io-index"
675
- checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
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.117"
691
+ version = "0.9.124"
683
692
  source = "registry+https://github.com/rust-lang/crates.io-index"
684
- checksum = "f900d1ce4629a2ebffaf5de74bd8f9c1188d4c5ed406df02f97e22f77a006f44"
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.117"
700
+ version = "0.9.124"
692
701
  source = "registry+https://github.com/rust-lang/crates.io-index"
693
- checksum = "ef1e9c857028f631056bcd6d88cec390c751e343ce2223ddb26d23eb4a151d59"
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.2"
715
+ version = "0.2.3"
707
716
  source = "registry+https://github.com/rust-lang/crates.io-index"
708
- checksum = "08f8d2924cf136a1315e2b4c7460a39f62ef11ee5d522df9b2750fab55b868b6"
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.2"
762
+ version = "1.1.3"
754
763
  source = "registry+https://github.com/rust-lang/crates.io-index"
755
- checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
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.145"
825
+ version = "1.0.149"
823
826
  source = "registry+https://github.com/rust-lang/crates.io-index"
824
- checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
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.0"
838
+ version = "1.1.1"
836
839
  source = "registry+https://github.com/rust-lang/crates.io-index"
837
- checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde"
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.7"
850
+ version = "0.3.8"
848
851
  source = "registry+https://github.com/rust-lang/crates.io-index"
849
- checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
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.108"
868
+ version = "2.0.114"
866
869
  source = "registry+https://github.com/rust-lang/crates.io-index"
867
- checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
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.17"
911
+ version = "2.0.18"
909
912
  source = "registry+https://github.com/rust-lang/crates.io-index"
910
- checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
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.17"
920
+ version = "2.0.18"
918
921
  source = "registry+https://github.com/rust-lang/crates.io-index"
919
- checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
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.44"
931
+ version = "0.3.45"
929
932
  source = "registry+https://github.com/rust-lang/crates.io-index"
930
- checksum = "91e7d9e3bb61134e77bde20dd4825b97c010155709965fedf0f49bb138e52a9d"
933
+ checksum = "f9e442fc33d7fdb45aa9bfeb312c095964abdf596f7567261062b2a7107aaabd"
931
934
  dependencies = [
932
935
  "deranged",
933
936
  "itoa",
934
937
  "num-conv",
935
938
  "powerfmt",
936
- "serde",
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.6"
946
+ version = "0.1.7"
944
947
  source = "registry+https://github.com/rust-lang/crates.io-index"
945
- checksum = "40868e7c1d2f0b8d73e4a8c7f0ff63af4f6d19be117e90bd73eb1d62cf831c6b"
948
+ checksum = "8b36ee98fd31ec7426d599183e8fe26932a8dc1fb76ddb6214d05493377d34ca"
946
949
 
947
950
  [[package]]
948
951
  name = "time-macros"
949
- version = "0.2.24"
952
+ version = "0.2.25"
950
953
  source = "registry+https://github.com/rust-lang/crates.io-index"
951
- checksum = "30cfb0125f12d9c277f35663a0a33f8c30190f4e4574868a330595412d34ebf3"
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.20"
983
+ version = "1.0.22"
981
984
  source = "registry+https://github.com/rust-lang/crates.io-index"
982
- checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
985
+ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5"
983
986
 
984
987
  [[package]]
985
988
  name = "unicode-normalization"
986
- version = "0.1.24"
989
+ version = "0.1.25"
987
990
  source = "registry+https://github.com/rust-lang/crates.io-index"
988
- checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956"
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"
@@ -10,10 +10,11 @@ magnus = { version = "0.8", features = ["rb-sys"] }
10
10
  rb-sys = { version = "*", default-features = false, features = [
11
11
  "stable-api-compiled-fallback",
12
12
  ] }
13
- comrak = { version = "0.48", features = ["shortcodes"] }
13
+ comrak = { version = "0.49", features = ["shortcodes"] }
14
14
  syntect = { version = "5.3", features = ["plist-load"] }
15
15
  typed-arena = "2.0"
16
16
  rctree = "0.6"
17
+ rb-allocator = "0.9"
17
18
 
18
19
  [lib]
19
20
  name = "commonmarker"
@@ -1,7 +1,9 @@
1
1
  extern crate core;
2
2
 
3
- use comrak::{markdown_to_html_with_plugins, parse_document};
4
- use magnus::{function, scan_args, RHash, Ruby, Value};
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
- fn commonmark_parse(args: &[Value]) -> Result<CommonmarkerNode, magnus::Error> {
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,): (String,) = args.required;
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, &rb_commonmark, &comrak_options);
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<String, magnus::Error> {
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,): (String,) = args.required;
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
- Ok(markdown_to_html_with_plugins(
108
- &rb_commonmark,
109
- &comrak_options,
110
- &comrak_plugins,
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]
@@ -3,7 +3,8 @@ use comrak::nodes::{
3
3
  AlertType, Ast as ComrakAst, AstNode as ComrakAstNode, ListDelimType, ListType, NodeAlert,
4
4
  NodeCode, NodeCodeBlock, NodeDescriptionItem, NodeFootnoteDefinition, NodeFootnoteReference,
5
5
  NodeHeading, NodeHtmlBlock, NodeLink, NodeList, NodeMath, NodeMultilineBlockQuote,
6
- NodeShortCode, NodeTable, NodeValue as ComrakNodeValue, NodeWikiLink, TableAlignment,
6
+ NodeShortCode, NodeTable, NodeTaskItem, NodeValue as ComrakNodeValue, NodeWikiLink,
7
+ TableAlignment,
7
8
  };
8
9
  use magnus::{function, method, scan_args, Module, Object, RHash, RModule, Symbol, Value};
9
10
  use magnus::{RArray, Ruby};
@@ -317,7 +318,10 @@ impl CommonmarkerNode {
317
318
 
318
319
  let (mark,) = kwargs.optional;
319
320
 
320
- ComrakNodeValue::TaskItem(mark)
321
+ ComrakNodeValue::TaskItem(NodeTaskItem {
322
+ symbol: mark,
323
+ symbol_sourcepos: (0, 0, 0, 0).into(),
324
+ })
321
325
  }
322
326
  "softbreak" => ComrakNodeValue::SoftBreak,
323
327
  "linebreak" => ComrakNodeValue::LineBreak,
@@ -1,8 +1,5 @@
1
1
  use magnus::{TryConvert, Value};
2
2
 
3
3
  pub fn try_convert_string(value: Value) -> Option<String> {
4
- match TryConvert::try_convert(value) {
5
- Ok(s) => Some(s),
6
- Err(_) => None,
7
- }
4
+ TryConvert::try_convert(value).ok()
8
5
  }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commonmarker
4
- VERSION = "2.6.0"
4
+ VERSION = "2.6.2"
5
5
  end
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.0
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: 2025-12-03 00:00:00.000000000 Z
11
+ date: 2026-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys