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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb0ba32c61444c922b6067ddccd86a91c7e1e08f1785e7604aad8dfcdb2d178a
4
- data.tar.gz: 4db23cd344f799b8beabeec19890448191bb0a5b0ec2d4510ee0bb4374b07cdd
3
+ metadata.gz: d9d6790deaf239d395fa86497f109ce5a2a4a32de0aa91b73ac8773f22b6dc81
4
+ data.tar.gz: 448f8817cda95d0d75dabf0bf4205b35af2e7566f840233810ba62e7cf53e692
5
5
  SHA512:
6
- metadata.gz: 2c141accb350977a877974ca0ad5380425da7a295a381a9249e4312e241a2a960a7f7f7900f62f117e47118445cea4f2488f1baeabb406247d59a07e9cd07ec2
7
- data.tar.gz: f39b49186a56dd8e9236aab1e8961b9d5ad1376bf2352d9d179e6fce2b57c11bfad8d8c7f117f6c436753e7441deeb8097a443b54aae6bb102e43e18ee6c2a94
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 2.9.4",
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.5.3"
107
+ version = "0.8.0"
108
108
  source = "registry+https://github.com/rust-lang/crates.io-index"
109
- checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1"
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.6.3"
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 = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
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.41.1"
263
+ version = "0.44.0"
270
264
  source = "registry+https://github.com/rust-lang/crates.io-index"
271
- checksum = "9a45df55bc7f91b899160098a7c9b35d6e575dfb4fe22100f014b41a171af2c6"
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.11.0"
380
+ version = "0.16.2"
386
381
  source = "registry+https://github.com/rust-lang/crates.io-index"
387
- checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2"
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.1"
520
+ version = "0.8.2"
519
521
  source = "registry+https://github.com/rust-lang/crates.io-index"
520
- checksum = "bd2ac6e71886be00ac34db92aa732c793c5107c95191805b9a1c7e70e6d342e0"
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 2.9.4",
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 2.9.4",
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.2.0"
892
+ version = "5.3.0"
891
893
  source = "registry+https://github.com/rust-lang/crates.io-index"
892
- checksum = "874dcfa363995604333cf947ae9f751ca3af4522c60886774c4963943b4746b1"
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 = "1.0.69"
924
+ version = "2.0.17"
924
925
  source = "registry+https://github.com/rust-lang/crates.io-index"
925
- checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"
926
+ checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8"
926
927
  dependencies = [
927
928
  "thiserror-impl",
928
929
  ]
929
930
 
930
931
  [[package]]
931
932
  name = "thiserror-impl"
932
- version = "1.0.69"
933
+ version = "2.0.17"
933
934
  source = "registry+https://github.com/rust-lang/crates.io-index"
934
- checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
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` |
@@ -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.41", features = ["shortcodes"] }
14
- syntect = { version = "5.2", features = ["plist-load"] }
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 = vec![];
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
- match std::str::from_utf8(&output) {
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 = vec![];
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
- match std::str::from_utf8(&output) {
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
  }
@@ -35,6 +35,7 @@ module Commonmarker
35
35
  superscript: false,
36
36
  header_ids: "",
37
37
  footnotes: false,
38
+ inline_footnotes: false,
38
39
  description_lists: false,
39
40
  front_matter_delimiter: "",
40
41
  multiline_block_quotes: false,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Commonmarker
4
- VERSION = "2.4.0"
4
+ VERSION = "2.5.0"
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.4.0
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-09-15 00:00:00.000000000 Z
11
+ date: 2025-10-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys