commonmarker 1.0.0.pre7-x64-mingw-ucrt → 1.0.0.pre8-x64-mingw-ucrt
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 +107 -94
- data/README.md +8 -1
- data/ext/commonmarker/Cargo.toml +2 -1
- data/ext/commonmarker/src/lib.rs +76 -6
- data/ext/commonmarker/src/plugins/syntax_highlighting.rs +28 -0
- data/lib/commonmarker/3.1/commonmarker.so +0 -0
- data/lib/commonmarker/3.2/commonmarker.so +0 -0
- data/lib/commonmarker/config.rb +1 -0
- data/lib/commonmarker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4ccc7a1c9f36931a5658ff4651e392462219f85ec7d63265b73f2a6007a48db
|
4
|
+
data.tar.gz: 36af23c368be45ad7dfb8a06cead21ce38d09f8bf8daf00d34e8dccbfd0ccf89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 86a7219c84da7e71fbe7512c119d777e3be2f8bdd39a16d8b25c9a3643ede5f2ee517e8c1560f60f58d2e34041a0f3eee89a6a7ba2d3ec8b8683590ea9eed43f
|
7
|
+
data.tar.gz: b49de4797275d9bc0d49628c2fd5a683608fbf1453c02fcb5b40c4963636bb2171c55d2d034cd9589490fe8babb1778c466a96167ebfc83815586ecd0d1be9e2
|
data/Cargo.lock
CHANGED
@@ -25,9 +25,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
|
25
25
|
|
26
26
|
[[package]]
|
27
27
|
name = "base64"
|
28
|
-
version = "0.
|
28
|
+
version = "0.21.0"
|
29
29
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
30
|
-
checksum = "
|
30
|
+
checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a"
|
31
31
|
|
32
32
|
[[package]]
|
33
33
|
name = "bincode"
|
@@ -89,9 +89,9 @@ dependencies = [
|
|
89
89
|
|
90
90
|
[[package]]
|
91
91
|
name = "cc"
|
92
|
-
version = "1.0.
|
92
|
+
version = "1.0.79"
|
93
93
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
94
|
-
checksum = "
|
94
|
+
checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f"
|
95
95
|
|
96
96
|
[[package]]
|
97
97
|
name = "cexpr"
|
@@ -110,9 +110,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|
110
110
|
|
111
111
|
[[package]]
|
112
112
|
name = "clang-sys"
|
113
|
-
version = "1.
|
113
|
+
version = "1.6.0"
|
114
114
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
115
|
-
checksum = "
|
115
|
+
checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a"
|
116
116
|
dependencies = [
|
117
117
|
"glob",
|
118
118
|
"libc",
|
@@ -121,9 +121,9 @@ dependencies = [
|
|
121
121
|
|
122
122
|
[[package]]
|
123
123
|
name = "clap"
|
124
|
-
version = "4.
|
124
|
+
version = "4.1.8"
|
125
125
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
126
|
-
checksum = "
|
126
|
+
checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
|
127
127
|
dependencies = [
|
128
128
|
"bitflags",
|
129
129
|
"clap_derive",
|
@@ -137,9 +137,9 @@ dependencies = [
|
|
137
137
|
|
138
138
|
[[package]]
|
139
139
|
name = "clap_derive"
|
140
|
-
version = "4.
|
140
|
+
version = "4.1.8"
|
141
141
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
142
|
-
checksum = "
|
142
|
+
checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0"
|
143
143
|
dependencies = [
|
144
144
|
"heck",
|
145
145
|
"proc-macro-error",
|
@@ -150,9 +150,9 @@ dependencies = [
|
|
150
150
|
|
151
151
|
[[package]]
|
152
152
|
name = "clap_lex"
|
153
|
-
version = "0.3.
|
153
|
+
version = "0.3.2"
|
154
154
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
155
|
-
checksum = "
|
155
|
+
checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09"
|
156
156
|
dependencies = [
|
157
157
|
"os_str_bytes",
|
158
158
|
]
|
@@ -163,6 +163,7 @@ version = "1.0.0"
|
|
163
163
|
dependencies = [
|
164
164
|
"comrak",
|
165
165
|
"magnus",
|
166
|
+
"syntect",
|
166
167
|
]
|
167
168
|
|
168
169
|
[[package]]
|
@@ -348,18 +349,15 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
|
348
349
|
|
349
350
|
[[package]]
|
350
351
|
name = "heck"
|
351
|
-
version = "0.4.
|
352
|
+
version = "0.4.1"
|
352
353
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
353
|
-
checksum = "
|
354
|
+
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
354
355
|
|
355
356
|
[[package]]
|
356
357
|
name = "hermit-abi"
|
357
|
-
version = "0.
|
358
|
+
version = "0.3.1"
|
358
359
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
359
|
-
checksum = "
|
360
|
-
dependencies = [
|
361
|
-
"libc",
|
362
|
-
]
|
360
|
+
checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
|
363
361
|
|
364
362
|
[[package]]
|
365
363
|
name = "indexmap"
|
@@ -373,9 +371,9 @@ dependencies = [
|
|
373
371
|
|
374
372
|
[[package]]
|
375
373
|
name = "io-lifetimes"
|
376
|
-
version = "1.0.
|
374
|
+
version = "1.0.5"
|
377
375
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
378
|
-
checksum = "
|
376
|
+
checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
|
379
377
|
dependencies = [
|
380
378
|
"libc",
|
381
379
|
"windows-sys",
|
@@ -383,9 +381,9 @@ dependencies = [
|
|
383
381
|
|
384
382
|
[[package]]
|
385
383
|
name = "is-terminal"
|
386
|
-
version = "0.4.
|
384
|
+
version = "0.4.4"
|
387
385
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
388
|
-
checksum = "
|
386
|
+
checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857"
|
389
387
|
dependencies = [
|
390
388
|
"hermit-abi",
|
391
389
|
"io-lifetimes",
|
@@ -450,9 +448,9 @@ checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
|
|
450
448
|
|
451
449
|
[[package]]
|
452
450
|
name = "magnus"
|
453
|
-
version = "0.
|
451
|
+
version = "0.5.1"
|
454
452
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
455
|
-
checksum = "
|
453
|
+
checksum = "ac1f63d741de829356a1399b34cbf6e79b79fc80aa85f86c8a2e7966768d95bc"
|
456
454
|
dependencies = [
|
457
455
|
"magnus-macros",
|
458
456
|
"rb-sys",
|
@@ -461,9 +459,9 @@ dependencies = [
|
|
461
459
|
|
462
460
|
[[package]]
|
463
461
|
name = "magnus-macros"
|
464
|
-
version = "0.
|
462
|
+
version = "0.4.0"
|
465
463
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
466
|
-
checksum = "
|
464
|
+
checksum = "85aa71c9891b2732ff1157e1860a1ee578459fd25811fd3d72cc6e32b3fbdfea"
|
467
465
|
dependencies = [
|
468
466
|
"proc-macro2",
|
469
467
|
"quote",
|
@@ -493,9 +491,9 @@ dependencies = [
|
|
493
491
|
|
494
492
|
[[package]]
|
495
493
|
name = "nom"
|
496
|
-
version = "7.1.
|
494
|
+
version = "7.1.3"
|
497
495
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
498
|
-
checksum = "
|
496
|
+
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
|
499
497
|
dependencies = [
|
500
498
|
"memchr",
|
501
499
|
"minimal-lexical",
|
@@ -503,9 +501,9 @@ dependencies = [
|
|
503
501
|
|
504
502
|
[[package]]
|
505
503
|
name = "once_cell"
|
506
|
-
version = "1.17.
|
504
|
+
version = "1.17.1"
|
507
505
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
508
|
-
checksum = "
|
506
|
+
checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
|
509
507
|
|
510
508
|
[[package]]
|
511
509
|
name = "onig"
|
@@ -543,9 +541,9 @@ checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
|
543
541
|
|
544
542
|
[[package]]
|
545
543
|
name = "pest"
|
546
|
-
version = "2.5.
|
544
|
+
version = "2.5.5"
|
547
545
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
548
|
-
checksum = "
|
546
|
+
checksum = "028accff104c4e513bad663bbcd2ad7cfd5304144404c31ed0a77ac103d00660"
|
549
547
|
dependencies = [
|
550
548
|
"thiserror",
|
551
549
|
"ucd-trie",
|
@@ -553,9 +551,9 @@ dependencies = [
|
|
553
551
|
|
554
552
|
[[package]]
|
555
553
|
name = "pest_derive"
|
556
|
-
version = "2.5.
|
554
|
+
version = "2.5.5"
|
557
555
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
558
|
-
checksum = "
|
556
|
+
checksum = "2ac3922aac69a40733080f53c1ce7f91dcf57e1a5f6c52f421fadec7fbdc4b69"
|
559
557
|
dependencies = [
|
560
558
|
"pest",
|
561
559
|
"pest_generator",
|
@@ -563,9 +561,9 @@ dependencies = [
|
|
563
561
|
|
564
562
|
[[package]]
|
565
563
|
name = "pest_generator"
|
566
|
-
version = "2.5.
|
564
|
+
version = "2.5.5"
|
567
565
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
568
|
-
checksum = "
|
566
|
+
checksum = "d06646e185566b5961b4058dd107e0a7f56e77c3f484549fb119867773c0f202"
|
569
567
|
dependencies = [
|
570
568
|
"pest",
|
571
569
|
"pest_meta",
|
@@ -576,13 +574,13 @@ dependencies = [
|
|
576
574
|
|
577
575
|
[[package]]
|
578
576
|
name = "pest_meta"
|
579
|
-
version = "2.5.
|
577
|
+
version = "2.5.5"
|
580
578
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
581
|
-
checksum = "
|
579
|
+
checksum = "e6f60b2ba541577e2a0c307c8f39d1439108120eb7903adeb6497fa880c59616"
|
582
580
|
dependencies = [
|
583
581
|
"once_cell",
|
584
582
|
"pest",
|
585
|
-
"
|
583
|
+
"sha2",
|
586
584
|
]
|
587
585
|
|
588
586
|
[[package]]
|
@@ -611,16 +609,16 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
|
|
611
609
|
|
612
610
|
[[package]]
|
613
611
|
name = "plist"
|
614
|
-
version = "1.
|
612
|
+
version = "1.4.1"
|
615
613
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
616
|
-
checksum = "
|
614
|
+
checksum = "9469799ca90293a376f68f6fcb8f11990d9cff55602cfba0ba83893c973a7f46"
|
617
615
|
dependencies = [
|
618
616
|
"base64",
|
619
617
|
"indexmap",
|
620
618
|
"line-wrap",
|
619
|
+
"quick-xml",
|
621
620
|
"serde",
|
622
621
|
"time",
|
623
|
-
"xml-rs",
|
624
622
|
]
|
625
623
|
|
626
624
|
[[package]]
|
@@ -649,13 +647,22 @@ dependencies = [
|
|
649
647
|
|
650
648
|
[[package]]
|
651
649
|
name = "proc-macro2"
|
652
|
-
version = "1.0.
|
650
|
+
version = "1.0.51"
|
653
651
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
654
|
-
checksum = "
|
652
|
+
checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6"
|
655
653
|
dependencies = [
|
656
654
|
"unicode-ident",
|
657
655
|
]
|
658
656
|
|
657
|
+
[[package]]
|
658
|
+
name = "quick-xml"
|
659
|
+
version = "0.26.0"
|
660
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
661
|
+
checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd"
|
662
|
+
dependencies = [
|
663
|
+
"memchr",
|
664
|
+
]
|
665
|
+
|
659
666
|
[[package]]
|
660
667
|
name = "quote"
|
661
668
|
version = "1.0.23"
|
@@ -667,29 +674,32 @@ dependencies = [
|
|
667
674
|
|
668
675
|
[[package]]
|
669
676
|
name = "rb-sys"
|
670
|
-
version = "0.9.
|
677
|
+
version = "0.9.65"
|
671
678
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
672
|
-
checksum = "
|
679
|
+
checksum = "e8fe617bad8e88fd7e5d6f432e35f09e5f94144dfb8e8ee4adde82fb920dc59b"
|
673
680
|
dependencies = [
|
674
681
|
"rb-sys-build",
|
675
682
|
]
|
676
683
|
|
677
684
|
[[package]]
|
678
685
|
name = "rb-sys-build"
|
679
|
-
version = "0.9.
|
686
|
+
version = "0.9.65"
|
680
687
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
681
|
-
checksum = "
|
688
|
+
checksum = "007e63597f91c711cbb299e60fecbdb6f5ad4a066d6a20c81943893f1584c895"
|
682
689
|
dependencies = [
|
683
690
|
"bindgen",
|
691
|
+
"lazy_static",
|
692
|
+
"quote",
|
684
693
|
"regex",
|
685
694
|
"shell-words",
|
695
|
+
"syn",
|
686
696
|
]
|
687
697
|
|
688
698
|
[[package]]
|
689
699
|
name = "rb-sys-env"
|
690
|
-
version = "0.1.
|
700
|
+
version = "0.1.2"
|
691
701
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
692
|
-
checksum = "
|
702
|
+
checksum = "a35802679f07360454b418a5d1735c89716bde01d35b1560fc953c1415a0b3bb"
|
693
703
|
|
694
704
|
[[package]]
|
695
705
|
name = "redox_syscall"
|
@@ -713,9 +723,9 @@ dependencies = [
|
|
713
723
|
|
714
724
|
[[package]]
|
715
725
|
name = "regex"
|
716
|
-
version = "1.7.
|
726
|
+
version = "1.7.1"
|
717
727
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
718
|
-
checksum = "
|
728
|
+
checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733"
|
719
729
|
dependencies = [
|
720
730
|
"aho-corasick",
|
721
731
|
"memchr",
|
@@ -736,9 +746,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
|
736
746
|
|
737
747
|
[[package]]
|
738
748
|
name = "rustix"
|
739
|
-
version = "0.36.
|
749
|
+
version = "0.36.8"
|
740
750
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
741
|
-
checksum = "
|
751
|
+
checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
|
742
752
|
dependencies = [
|
743
753
|
"bitflags",
|
744
754
|
"errno",
|
@@ -788,9 +798,9 @@ dependencies = [
|
|
788
798
|
|
789
799
|
[[package]]
|
790
800
|
name = "serde_json"
|
791
|
-
version = "1.0.
|
801
|
+
version = "1.0.93"
|
792
802
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
793
|
-
checksum = "
|
803
|
+
checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76"
|
794
804
|
dependencies = [
|
795
805
|
"itoa",
|
796
806
|
"ryu",
|
@@ -798,10 +808,10 @@ dependencies = [
|
|
798
808
|
]
|
799
809
|
|
800
810
|
[[package]]
|
801
|
-
name = "
|
802
|
-
version = "0.10.
|
811
|
+
name = "sha2"
|
812
|
+
version = "0.10.6"
|
803
813
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
804
|
-
checksum = "
|
814
|
+
checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
|
805
815
|
dependencies = [
|
806
816
|
"cfg-if",
|
807
817
|
"cpufeatures",
|
@@ -843,9 +853,9 @@ checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
|
|
843
853
|
|
844
854
|
[[package]]
|
845
855
|
name = "syn"
|
846
|
-
version = "1.0.
|
856
|
+
version = "1.0.109"
|
847
857
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
848
|
-
checksum = "
|
858
|
+
checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
|
849
859
|
dependencies = [
|
850
860
|
"proc-macro2",
|
851
861
|
"quote",
|
@@ -878,18 +888,18 @@ dependencies = [
|
|
878
888
|
|
879
889
|
[[package]]
|
880
890
|
name = "termcolor"
|
881
|
-
version = "1.
|
891
|
+
version = "1.2.0"
|
882
892
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
883
|
-
checksum = "
|
893
|
+
checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6"
|
884
894
|
dependencies = [
|
885
895
|
"winapi-util",
|
886
896
|
]
|
887
897
|
|
888
898
|
[[package]]
|
889
899
|
name = "terminal_size"
|
890
|
-
version = "0.2.
|
900
|
+
version = "0.2.5"
|
891
901
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
892
|
-
checksum = "
|
902
|
+
checksum = "4c9afddd2cec1c0909f06b00ef33f94ab2cc0578c4a610aa208ddfec8aa2b43a"
|
893
903
|
dependencies = [
|
894
904
|
"rustix",
|
895
905
|
"windows-sys",
|
@@ -917,9 +927,9 @@ dependencies = [
|
|
917
927
|
|
918
928
|
[[package]]
|
919
929
|
name = "time"
|
920
|
-
version = "0.3.
|
930
|
+
version = "0.3.20"
|
921
931
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
922
|
-
checksum = "
|
932
|
+
checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
|
923
933
|
dependencies = [
|
924
934
|
"itoa",
|
925
935
|
"serde",
|
@@ -935,18 +945,18 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd"
|
|
935
945
|
|
936
946
|
[[package]]
|
937
947
|
name = "time-macros"
|
938
|
-
version = "0.2.
|
948
|
+
version = "0.2.8"
|
939
949
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
940
|
-
checksum = "
|
950
|
+
checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
|
941
951
|
dependencies = [
|
942
952
|
"time-core",
|
943
953
|
]
|
944
954
|
|
945
955
|
[[package]]
|
946
956
|
name = "typed-arena"
|
947
|
-
version = "2.0.
|
957
|
+
version = "2.0.2"
|
948
958
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
949
|
-
checksum = "
|
959
|
+
checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"
|
950
960
|
|
951
961
|
[[package]]
|
952
962
|
name = "typenum"
|
@@ -1028,9 +1038,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
1028
1038
|
|
1029
1039
|
[[package]]
|
1030
1040
|
name = "windows-sys"
|
1031
|
-
version = "0.
|
1041
|
+
version = "0.45.0"
|
1032
1042
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1033
|
-
checksum = "
|
1043
|
+
checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"
|
1044
|
+
dependencies = [
|
1045
|
+
"windows-targets",
|
1046
|
+
]
|
1047
|
+
|
1048
|
+
[[package]]
|
1049
|
+
name = "windows-targets"
|
1050
|
+
version = "0.42.1"
|
1051
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1052
|
+
checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7"
|
1034
1053
|
dependencies = [
|
1035
1054
|
"windows_aarch64_gnullvm",
|
1036
1055
|
"windows_aarch64_msvc",
|
@@ -1043,45 +1062,45 @@ dependencies = [
|
|
1043
1062
|
|
1044
1063
|
[[package]]
|
1045
1064
|
name = "windows_aarch64_gnullvm"
|
1046
|
-
version = "0.42.
|
1065
|
+
version = "0.42.1"
|
1047
1066
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1048
|
-
checksum = "
|
1067
|
+
checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608"
|
1049
1068
|
|
1050
1069
|
[[package]]
|
1051
1070
|
name = "windows_aarch64_msvc"
|
1052
|
-
version = "0.42.
|
1071
|
+
version = "0.42.1"
|
1053
1072
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1054
|
-
checksum = "
|
1073
|
+
checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
|
1055
1074
|
|
1056
1075
|
[[package]]
|
1057
1076
|
name = "windows_i686_gnu"
|
1058
|
-
version = "0.42.
|
1077
|
+
version = "0.42.1"
|
1059
1078
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1060
|
-
checksum = "
|
1079
|
+
checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
|
1061
1080
|
|
1062
1081
|
[[package]]
|
1063
1082
|
name = "windows_i686_msvc"
|
1064
|
-
version = "0.42.
|
1083
|
+
version = "0.42.1"
|
1065
1084
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1066
|
-
checksum = "
|
1085
|
+
checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
|
1067
1086
|
|
1068
1087
|
[[package]]
|
1069
1088
|
name = "windows_x86_64_gnu"
|
1070
|
-
version = "0.42.
|
1089
|
+
version = "0.42.1"
|
1071
1090
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1072
|
-
checksum = "
|
1091
|
+
checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45"
|
1073
1092
|
|
1074
1093
|
[[package]]
|
1075
1094
|
name = "windows_x86_64_gnullvm"
|
1076
|
-
version = "0.42.
|
1095
|
+
version = "0.42.1"
|
1077
1096
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1078
|
-
checksum = "
|
1097
|
+
checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463"
|
1079
1098
|
|
1080
1099
|
[[package]]
|
1081
1100
|
name = "windows_x86_64_msvc"
|
1082
|
-
version = "0.42.
|
1101
|
+
version = "0.42.1"
|
1083
1102
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1084
|
-
checksum = "
|
1103
|
+
checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
|
1085
1104
|
|
1086
1105
|
[[package]]
|
1087
1106
|
name = "xdg"
|
@@ -1092,12 +1111,6 @@ dependencies = [
|
|
1092
1111
|
"dirs",
|
1093
1112
|
]
|
1094
1113
|
|
1095
|
-
[[package]]
|
1096
|
-
name = "xml-rs"
|
1097
|
-
version = "0.8.4"
|
1098
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
1099
|
-
checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3"
|
1100
|
-
|
1101
1114
|
[[package]]
|
1102
1115
|
name = "yaml-rust"
|
1103
1116
|
version = "0.4.5"
|
data/README.md
CHANGED
@@ -131,9 +131,16 @@ Commonmarker.to_html(code, plugins: { syntax_highlighter: nil })
|
|
131
131
|
Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: nil } })
|
132
132
|
```
|
133
133
|
|
134
|
+
You can also provide a `path` to a directory containing `.tmtheme` files to load:
|
135
|
+
|
136
|
+
```ruby
|
137
|
+
|
138
|
+
Commonmarker.to_html(code, plugins: { syntax_highlighter: { theme: "Monokai", path: "./themes" } })
|
139
|
+
```
|
140
|
+
|
134
141
|
##### Available themes
|
135
142
|
|
136
|
-
Here's [a list of available
|
143
|
+
Here's [a list of themes available by default](https://docs.rs/syntect/5.0.0/syntect/highlighting/struct.ThemeSet.html#implementations):
|
137
144
|
|
138
145
|
- `"base16-ocean.dark"`
|
139
146
|
- `"base16-eighties.dark"`
|
data/ext/commonmarker/Cargo.toml
CHANGED
data/ext/commonmarker/src/lib.rs
CHANGED
@@ -1,10 +1,17 @@
|
|
1
1
|
extern crate core;
|
2
2
|
|
3
|
+
use std::path::PathBuf;
|
4
|
+
|
5
|
+
use ::syntect::highlighting::ThemeSet;
|
3
6
|
use comrak::{
|
4
|
-
adapters::SyntaxHighlighterAdapter,
|
5
|
-
|
7
|
+
adapters::SyntaxHighlighterAdapter,
|
8
|
+
markdown_to_html, markdown_to_html_with_plugins,
|
9
|
+
plugins::syntect::{SyntectAdapter, SyntectAdapterBuilder},
|
10
|
+
ComrakOptions, ComrakPlugins,
|
11
|
+
};
|
12
|
+
use magnus::{
|
13
|
+
define_module, exception, function, r_hash::ForEach, scan_args, Error, RHash, Symbol, Value,
|
6
14
|
};
|
7
|
-
use magnus::{define_module, function, r_hash::ForEach, scan_args, Error, RHash, Symbol, Value};
|
8
15
|
|
9
16
|
mod options;
|
10
17
|
use options::iterate_options_hash;
|
@@ -12,7 +19,8 @@ use options::iterate_options_hash;
|
|
12
19
|
mod plugins;
|
13
20
|
use plugins::{
|
14
21
|
syntax_highlighting::{
|
15
|
-
|
22
|
+
fetch_syntax_highlighter_path, fetch_syntax_highlighter_theme,
|
23
|
+
SYNTAX_HIGHLIGHTER_PLUGIN_DEFAULT_THEME,
|
16
24
|
},
|
17
25
|
SYNTAX_HIGHLIGHTER_PLUGIN,
|
18
26
|
};
|
@@ -52,13 +60,75 @@ fn commonmark_to_html<'a>(args: &[Value]) -> Result<String, magnus::Error> {
|
|
52
60
|
let adapter: SyntectAdapter;
|
53
61
|
|
54
62
|
let theme = match rb_plugins.get(Symbol::new(SYNTAX_HIGHLIGHTER_PLUGIN)) {
|
55
|
-
Some(
|
63
|
+
Some(syntax_highlighter_options) => {
|
64
|
+
fetch_syntax_highlighter_theme(syntax_highlighter_options)?
|
65
|
+
}
|
56
66
|
None => SYNTAX_HIGHLIGHTER_PLUGIN_DEFAULT_THEME.to_string(), // no `syntax_highlighter:` defined
|
57
67
|
};
|
58
68
|
|
59
|
-
|
69
|
+
let path = match rb_plugins.get(Symbol::new(SYNTAX_HIGHLIGHTER_PLUGIN)) {
|
70
|
+
Some(syntax_highlighter_options) => {
|
71
|
+
fetch_syntax_highlighter_path(syntax_highlighter_options)?
|
72
|
+
}
|
73
|
+
None => PathBuf::from("".to_string()), // no `syntax_highlighter:` defined
|
74
|
+
};
|
75
|
+
|
76
|
+
if !path.eq(&PathBuf::from("".to_string())) && !path.exists() {
|
77
|
+
return Err(Error::new(
|
78
|
+
exception::arg_error(),
|
79
|
+
format!("path does not exist"),
|
80
|
+
));
|
81
|
+
}
|
82
|
+
|
83
|
+
if theme.is_empty() && path.exists() {
|
84
|
+
return Err(Error::new(
|
85
|
+
exception::arg_error(),
|
86
|
+
"`path` also needs `theme` passed into the `syntax_highlighter`",
|
87
|
+
));
|
88
|
+
}
|
89
|
+
if path.exists() && !path.is_dir() {
|
90
|
+
return Err(Error::new(
|
91
|
+
exception::arg_error(),
|
92
|
+
"`path` needs to be a directory",
|
93
|
+
));
|
94
|
+
}
|
95
|
+
|
96
|
+
if path.exists() {
|
97
|
+
let builder = SyntectAdapterBuilder::new();
|
98
|
+
let mut ts = ThemeSet::load_defaults();
|
99
|
+
|
100
|
+
match ts.add_from_folder(&path) {
|
101
|
+
Ok(_) => {}
|
102
|
+
Err(e) => {
|
103
|
+
return Err(Error::new(
|
104
|
+
exception::arg_error(),
|
105
|
+
format!("failed to load theme set from path: {e}"),
|
106
|
+
));
|
107
|
+
}
|
108
|
+
}
|
109
|
+
|
110
|
+
ts.themes.get(&theme).ok_or_else(|| {
|
111
|
+
Error::new(
|
112
|
+
exception::arg_error(),
|
113
|
+
format!("theme `{}` does not exist", theme),
|
114
|
+
)
|
115
|
+
})?;
|
116
|
+
|
117
|
+
adapter = builder.theme_set(ts).theme(&theme).build();
|
118
|
+
|
119
|
+
syntax_highlighter = Some(&adapter);
|
120
|
+
} else if theme.is_empty() || theme == "none" {
|
60
121
|
syntax_highlighter = None;
|
61
122
|
} else {
|
123
|
+
ThemeSet::load_defaults()
|
124
|
+
.themes
|
125
|
+
.get(&theme)
|
126
|
+
.ok_or_else(|| {
|
127
|
+
Error::new(
|
128
|
+
exception::arg_error(),
|
129
|
+
format!("theme `{}` does not exist", theme),
|
130
|
+
)
|
131
|
+
})?;
|
62
132
|
adapter = SyntectAdapter::new(&theme);
|
63
133
|
syntax_highlighter = Some(&adapter);
|
64
134
|
}
|
@@ -1,8 +1,11 @@
|
|
1
|
+
use std::path::PathBuf;
|
2
|
+
|
1
3
|
use magnus::{RHash, Symbol, Value};
|
2
4
|
|
3
5
|
use crate::EMPTY_STR;
|
4
6
|
|
5
7
|
pub const SYNTAX_HIGHLIGHTER_PLUGIN_THEME_KEY: &str = "theme";
|
8
|
+
pub const SYNTAX_HIGHLIGHTER_PLUGIN_PATH_KEY: &str = "path";
|
6
9
|
pub const SYNTAX_HIGHLIGHTER_PLUGIN_DEFAULT_THEME: &str = "base16-ocean.dark";
|
7
10
|
|
8
11
|
pub fn fetch_syntax_highlighter_theme(value: Value) -> Result<String, magnus::Error> {
|
@@ -28,3 +31,28 @@ pub fn fetch_syntax_highlighter_theme(value: Value) -> Result<String, magnus::Er
|
|
28
31
|
}
|
29
32
|
}
|
30
33
|
}
|
34
|
+
|
35
|
+
pub fn fetch_syntax_highlighter_path(value: Value) -> Result<PathBuf, magnus::Error> {
|
36
|
+
if value.is_nil() {
|
37
|
+
// `syntax_highlighter: nil`
|
38
|
+
return Ok(PathBuf::from(EMPTY_STR));
|
39
|
+
}
|
40
|
+
|
41
|
+
let syntax_highlighter_plugin = value.try_convert::<RHash>()?;
|
42
|
+
let path_key = Symbol::new(SYNTAX_HIGHLIGHTER_PLUGIN_PATH_KEY);
|
43
|
+
|
44
|
+
match syntax_highlighter_plugin.get(path_key) {
|
45
|
+
Some(path) => {
|
46
|
+
if path.is_nil() {
|
47
|
+
// `syntax_highlighter: { path: nil }`
|
48
|
+
return Ok(PathBuf::from(EMPTY_STR));
|
49
|
+
}
|
50
|
+
|
51
|
+
Ok(PathBuf::from(path.try_convert::<String>()?))
|
52
|
+
}
|
53
|
+
None => {
|
54
|
+
// `syntax_highlighter: { }`
|
55
|
+
Ok(PathBuf::from(EMPTY_STR))
|
56
|
+
}
|
57
|
+
}
|
58
|
+
}
|
Binary file
|
Binary file
|
data/lib/commonmarker/config.rb
CHANGED
data/lib/commonmarker/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: commonmarker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.pre8
|
5
5
|
platform: x64-mingw-ucrt
|
6
6
|
authors:
|
7
7
|
- Garen Torikian
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-
|
12
|
+
date: 2023-03-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rb_sys
|