commonmarker 2.4.0 → 2.5.0
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 +28 -27
- data/README.md +1 -0
- data/ext/commonmarker/Cargo.toml +2 -2
- data/ext/commonmarker/src/node.rs +4 -16
- data/ext/commonmarker/src/options.rs +4 -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: d9d6790deaf239d395fa86497f109ce5a2a4a32de0aa91b73ac8773f22b6dc81
|
|
4
|
+
data.tar.gz: 448f8817cda95d0d75dabf0bf4205b35af2e7566f840233810ba62e7cf53e692
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1cbd1bbda09ff2df41fa129ca9363cbd157ff7b65ee9da4a68eb48bf071dbee35b5ea7ad2c710979a2ad8185a74d5a66462d1f142913674e4bbcebfe96cfea07
|
|
7
|
+
data.tar.gz: a307526043574d23b537e822ff11fd4d501be2bc31abdf14ed0780c6b76860dbf35118e65f14552479a5c3ddc3edf9ede9ccdc6032242c19eba94201e34495ca
|
data/Cargo.lock
CHANGED
|
@@ -88,7 +88,7 @@ version = "0.69.5"
|
|
|
88
88
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
89
89
|
checksum = "271383c67ccabffb7381723dea0672a673f292304fcb45c01cc648c7a8d58088"
|
|
90
90
|
dependencies = [
|
|
91
|
-
"bitflags
|
|
91
|
+
"bitflags",
|
|
92
92
|
"cexpr",
|
|
93
93
|
"clang-sys",
|
|
94
94
|
"itertools",
|
|
@@ -104,24 +104,18 @@ dependencies = [
|
|
|
104
104
|
|
|
105
105
|
[[package]]
|
|
106
106
|
name = "bit-set"
|
|
107
|
-
version = "0.
|
|
107
|
+
version = "0.8.0"
|
|
108
108
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
109
|
-
checksum = "
|
|
109
|
+
checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"
|
|
110
110
|
dependencies = [
|
|
111
111
|
"bit-vec",
|
|
112
112
|
]
|
|
113
113
|
|
|
114
114
|
[[package]]
|
|
115
115
|
name = "bit-vec"
|
|
116
|
-
version = "0.
|
|
117
|
-
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
118
|
-
checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb"
|
|
119
|
-
|
|
120
|
-
[[package]]
|
|
121
|
-
name = "bitflags"
|
|
122
|
-
version = "1.3.2"
|
|
116
|
+
version = "0.8.0"
|
|
123
117
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
124
|
-
checksum = "
|
|
118
|
+
checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"
|
|
125
119
|
|
|
126
120
|
[[package]]
|
|
127
121
|
name = "bitflags"
|
|
@@ -266,15 +260,16 @@ dependencies = [
|
|
|
266
260
|
|
|
267
261
|
[[package]]
|
|
268
262
|
name = "comrak"
|
|
269
|
-
version = "0.
|
|
263
|
+
version = "0.44.0"
|
|
270
264
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
271
|
-
checksum = "
|
|
265
|
+
checksum = "07fcaf1ac457de7574ce514fd9a68e86e8196165529f48a544ec90cbea840e04"
|
|
272
266
|
dependencies = [
|
|
273
267
|
"bon",
|
|
274
268
|
"caseless",
|
|
275
269
|
"clap",
|
|
276
270
|
"emojis",
|
|
277
271
|
"entities",
|
|
272
|
+
"fmt2io",
|
|
278
273
|
"memchr",
|
|
279
274
|
"shell-words",
|
|
280
275
|
"slug",
|
|
@@ -382,12 +377,13 @@ dependencies = [
|
|
|
382
377
|
|
|
383
378
|
[[package]]
|
|
384
379
|
name = "fancy-regex"
|
|
385
|
-
version = "0.
|
|
380
|
+
version = "0.16.2"
|
|
386
381
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
387
|
-
checksum = "
|
|
382
|
+
checksum = "998b056554fbe42e03ae0e152895cd1a7e1002aec800fdc6635d20270260c46f"
|
|
388
383
|
dependencies = [
|
|
389
384
|
"bit-set",
|
|
390
|
-
"regex",
|
|
385
|
+
"regex-automata",
|
|
386
|
+
"regex-syntax",
|
|
391
387
|
]
|
|
392
388
|
|
|
393
389
|
[[package]]
|
|
@@ -406,6 +402,12 @@ dependencies = [
|
|
|
406
402
|
"miniz_oxide",
|
|
407
403
|
]
|
|
408
404
|
|
|
405
|
+
[[package]]
|
|
406
|
+
name = "fmt2io"
|
|
407
|
+
version = "1.0.0"
|
|
408
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
409
|
+
checksum = "6b6129284da9f7e5296cc22183a63f24300e945e297705dcc0672f7df01d62c8"
|
|
410
|
+
|
|
409
411
|
[[package]]
|
|
410
412
|
name = "fnv"
|
|
411
413
|
version = "1.0.7"
|
|
@@ -515,9 +517,9 @@ checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
|
|
|
515
517
|
|
|
516
518
|
[[package]]
|
|
517
519
|
name = "magnus"
|
|
518
|
-
version = "0.8.
|
|
520
|
+
version = "0.8.2"
|
|
519
521
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
520
|
-
checksum = "
|
|
522
|
+
checksum = "3b36a5b126bbe97eb0d02d07acfeb327036c6319fd816139a49824a83b7f9012"
|
|
521
523
|
dependencies = [
|
|
522
524
|
"magnus-macros",
|
|
523
525
|
"rb-sys",
|
|
@@ -591,7 +593,7 @@ version = "6.5.1"
|
|
|
591
593
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
592
594
|
checksum = "336b9c63443aceef14bea841b899035ae3abe89b7c486aaf4c5bd8aafedac3f0"
|
|
593
595
|
dependencies = [
|
|
594
|
-
"bitflags
|
|
596
|
+
"bitflags",
|
|
595
597
|
"libc",
|
|
596
598
|
"once_cell",
|
|
597
599
|
"onig_sys",
|
|
@@ -764,7 +766,7 @@ version = "1.1.2"
|
|
|
764
766
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
765
767
|
checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
|
|
766
768
|
dependencies = [
|
|
767
|
-
"bitflags
|
|
769
|
+
"bitflags",
|
|
768
770
|
"errno",
|
|
769
771
|
"libc",
|
|
770
772
|
"linux-raw-sys",
|
|
@@ -887,12 +889,11 @@ dependencies = [
|
|
|
887
889
|
|
|
888
890
|
[[package]]
|
|
889
891
|
name = "syntect"
|
|
890
|
-
version = "5.
|
|
892
|
+
version = "5.3.0"
|
|
891
893
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
892
|
-
checksum = "
|
|
894
|
+
checksum = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925"
|
|
893
895
|
dependencies = [
|
|
894
896
|
"bincode",
|
|
895
|
-
"bitflags 1.3.2",
|
|
896
897
|
"fancy-regex",
|
|
897
898
|
"flate2",
|
|
898
899
|
"fnv",
|
|
@@ -920,18 +921,18 @@ dependencies = [
|
|
|
920
921
|
|
|
921
922
|
[[package]]
|
|
922
923
|
name = "thiserror"
|
|
923
|
-
version = "
|
|
924
|
+
version = "2.0.17"
|
|
924
925
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
925
|
-
checksum = "
|
|
926
|
+
checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
|
|
926
927
|
dependencies = [
|
|
927
928
|
"thiserror-impl",
|
|
928
929
|
]
|
|
929
930
|
|
|
930
931
|
[[package]]
|
|
931
932
|
name = "thiserror-impl"
|
|
932
|
-
version = "
|
|
933
|
+
version = "2.0.17"
|
|
933
934
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
934
|
-
checksum = "
|
|
935
|
+
checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913"
|
|
935
936
|
dependencies = [
|
|
936
937
|
"proc-macro2",
|
|
937
938
|
"quote",
|
data/README.md
CHANGED
|
@@ -202,6 +202,7 @@ Commonmarker.to_html('"Hi *there*"', options: {
|
|
|
202
202
|
| `superscript` | Enables the superscript Comrak extension. | `false` |
|
|
203
203
|
| `header_ids` | Enables the header IDs Comrak extension. from the GFM spec. | `""` |
|
|
204
204
|
| `footnotes` | Enables the footnotes extension per `cmark-gfm`. | `false` |
|
|
205
|
+
| `inline_footnotes` | Enables the inline footnotes extension. | `false` |
|
|
205
206
|
| `description_lists` | Enables the description lists extension. | `false` |
|
|
206
207
|
| `front_matter_delimiter` | Enables the front matter extension. | `""` |
|
|
207
208
|
| `multiline_block_quotes` | Enables the multiline block quotes extension. | `false` |
|
data/ext/commonmarker/Cargo.toml
CHANGED
|
@@ -10,8 +10,8 @@ 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.
|
|
14
|
-
syntect = { version = "5.
|
|
13
|
+
comrak = { version = "0.44", features = ["shortcodes"] }
|
|
14
|
+
syntect = { version = "5.3", features = ["plist-load"] }
|
|
15
15
|
typed-arena = "2.0"
|
|
16
16
|
rctree = "0.6"
|
|
17
17
|
|
|
@@ -1044,7 +1044,7 @@ impl CommonmarkerNode {
|
|
|
1044
1044
|
comrak_root_node.append(new_child);
|
|
1045
1045
|
}
|
|
1046
1046
|
|
|
1047
|
-
let mut output =
|
|
1047
|
+
let mut output = String::new();
|
|
1048
1048
|
match comrak::format_html_with_plugins(
|
|
1049
1049
|
&comrak_root_node,
|
|
1050
1050
|
&comrak_options,
|
|
@@ -1060,13 +1060,7 @@ impl CommonmarkerNode {
|
|
|
1060
1060
|
}
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
|
-
|
|
1064
|
-
Ok(s) => Ok(s.to_string()),
|
|
1065
|
-
Err(_e) => Err(magnus::Error::new(
|
|
1066
|
-
ruby.exception_runtime_error(),
|
|
1067
|
-
"cannot convert into utf-8",
|
|
1068
|
-
)),
|
|
1069
|
-
}
|
|
1063
|
+
Ok(output)
|
|
1070
1064
|
}
|
|
1071
1065
|
|
|
1072
1066
|
fn to_commonmark(&self, args: &[Value]) -> Result<String, magnus::Error> {
|
|
@@ -1125,7 +1119,7 @@ impl CommonmarkerNode {
|
|
|
1125
1119
|
comrak_root_node.append(new_child);
|
|
1126
1120
|
}
|
|
1127
1121
|
|
|
1128
|
-
let mut output =
|
|
1122
|
+
let mut output = String::new();
|
|
1129
1123
|
match comrak::format_commonmark_with_plugins(
|
|
1130
1124
|
&comrak_root_node,
|
|
1131
1125
|
&comrak_options,
|
|
@@ -1141,13 +1135,7 @@ impl CommonmarkerNode {
|
|
|
1141
1135
|
}
|
|
1142
1136
|
}
|
|
1143
1137
|
|
|
1144
|
-
|
|
1145
|
-
Ok(s) => Ok(s.to_string()),
|
|
1146
|
-
Err(_e) => Err(magnus::Error::new(
|
|
1147
|
-
ruby.exception_runtime_error(),
|
|
1148
|
-
"cannot convert into utf-8",
|
|
1149
|
-
)),
|
|
1150
|
-
}
|
|
1138
|
+
Ok(output)
|
|
1151
1139
|
}
|
|
1152
1140
|
}
|
|
1153
1141
|
|
|
@@ -109,6 +109,7 @@ const EXTENSION_TASKLIST: &str = "tasklist";
|
|
|
109
109
|
const EXTENSION_SUPERSCRIPT: &str = "superscript";
|
|
110
110
|
const EXTENSION_HEADER_IDS: &str = "header_ids";
|
|
111
111
|
const EXTENSION_FOOTNOTES: &str = "footnotes";
|
|
112
|
+
const EXTENSION_INLINE_FOOTNOTES: &str = "inline_footnotes";
|
|
112
113
|
const EXTENSION_DESCRIPTION_LISTS: &str = "description_lists";
|
|
113
114
|
const EXTENSION_FRONT_MATTER_DELIMITER: &str = "front_matter_delimiter";
|
|
114
115
|
const EXTENSION_MULTILINE_BLOCK_QUOTES: &str = "multiline_block_quotes";
|
|
@@ -152,6 +153,9 @@ fn iterate_extension_options(comrak_options: &mut ComrakOptions, options_hash: R
|
|
|
152
153
|
Cow::Borrowed(EXTENSION_FOOTNOTES) => {
|
|
153
154
|
comrak_options.extension.footnotes = TryConvert::try_convert(value)?;
|
|
154
155
|
}
|
|
156
|
+
Cow::Borrowed(EXTENSION_INLINE_FOOTNOTES) => {
|
|
157
|
+
comrak_options.extension.inline_footnotes = TryConvert::try_convert(value)?;
|
|
158
|
+
}
|
|
155
159
|
Cow::Borrowed(EXTENSION_DESCRIPTION_LISTS) => {
|
|
156
160
|
comrak_options.extension.description_lists = TryConvert::try_convert(value)?;
|
|
157
161
|
}
|
data/lib/commonmarker/config.rb
CHANGED
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.
|
|
4
|
+
version: 2.5.0
|
|
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-
|
|
11
|
+
date: 2025-10-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|