html-to-markdown 3.17.2 → 3.18.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: e83d2359255cb6e699e7aa1dae1d832be108401a10da0e5f94673044d5d514da
4
- data.tar.gz: 9927013e10906595971ec4da689c8a7f339c40d23ab0b15cda2d5932698f97ea
3
+ metadata.gz: 37a8744fa263274a9aea6ecd4b8e5d8badd93887046279139a09ddf362daa7bb
4
+ data.tar.gz: 1243b4f7a60d663959ae4746990a9ac0d1759eab3df39300f600ea6807581e94
5
5
  SHA512:
6
- metadata.gz: b4cfb6df3ec71ff6e23503436eed5f3205c9f9a1231bfac56d85318ff1a9c717ce0709490ddee7f74476b92833ac141689f34f134e0b0b7e6755f533b376e9d8
7
- data.tar.gz: c5e3e60f12843c81c9d315e74a0ee8501d396ad874a07397ec082316634a122743ff8190cbf6e26c6e45dcb10c27dfd743c9ad1d3ed07e3f3e84347ada7ba3c8
6
+ metadata.gz: 9aed731f09eff7d7ff9509830712c22dda86415404a6d8169b97683b8c31e32d73f510edafb1c7a235683eac9163cf10493efd2fa43e3ea1269b0b95a998ee0c
7
+ data.tar.gz: 1f760c987320f6976869cf1f68d84b7dff1995d5b513300be54148210620cddb4ffcc8603059cc0c6269d129adbfea94270a046fed7a20dd606a7af9a312cf96
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <!-- This file is auto-generated by alef — DO NOT EDIT. -->
2
- <!-- alef:hash:d98726a9cd86055842b72feb747ffaa8addd2fd9ba0d95a4d7e20db3280d1ea0 -->
2
+ <!-- alef:hash:cb80328456dcb271efa3f7851e475022ff26cfe3112b09a2e41384313ff520d0 -->
3
3
  <!-- To regenerate: alef readme -->
4
4
  <!-- To verify freshness: alef verify -->
5
5
 
@@ -112,6 +112,19 @@ Requires Ruby 3.2+ with Magnus native extension bindings. Published for Linux, m
112
112
  | Tables (Countries) | 360KB | 2.15ms | 167 MB/s |
113
113
  | Mixed (Python wiki) | 656KB | 4.89ms | 134 MB/s |
114
114
 
115
+ ## Coding-agent plugin
116
+
117
+ Install the [html-to-markdown plugin](https://github.com/xberg-io/html-to-markdown/blob/main/plugin/README.md)
118
+ for product skills and runtime integrations, or install [public skills](https://github.com/xberg-io/html-to-markdown/tree/main/skills)
119
+ independently:
120
+
121
+ ```sh
122
+ npx skills add xberg-io/html-to-markdown
123
+ ```
124
+
125
+ Select the skills and target agents interactively. Install the product CLI separately for
126
+ executable operations; the skill installer adds instructions only.
127
+
115
128
  ## Quick Start
116
129
 
117
130
  Basic conversion:
@@ -47,7 +47,7 @@ checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"
47
47
  dependencies = [
48
48
  "proc-macro2",
49
49
  "quote",
50
- "syn 3.0.6",
50
+ "syn 3.0.9",
51
51
  ]
52
52
 
53
53
  [[package]]
@@ -173,14 +173,14 @@ checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"
173
173
  dependencies = [
174
174
  "proc-macro2",
175
175
  "quote",
176
- "syn 3.0.6",
176
+ "syn 3.0.9",
177
177
  ]
178
178
 
179
179
  [[package]]
180
180
  name = "either"
181
- version = "1.18.0"
181
+ version = "1.19.0"
182
182
  source = "registry+https://github.com/rust-lang/crates.io-index"
183
- checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34"
183
+ checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"
184
184
 
185
185
  [[package]]
186
186
  name = "fastrand"
@@ -246,13 +246,13 @@ checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"
246
246
 
247
247
  [[package]]
248
248
  name = "html-escape"
249
- version = "0.2.15"
249
+ version = "0.3.0"
250
250
  source = "registry+https://github.com/rust-lang/crates.io-index"
251
- checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5"
251
+ checksum = "491194d601b4fa9fac3c9571e014070a0ad1bc3392d1bc10419695196a8b3cc3"
252
252
 
253
253
  [[package]]
254
254
  name = "html-to-markdown-rb"
255
- version = "3.17.2"
255
+ version = "3.18.0"
256
256
  dependencies = [
257
257
  "async-trait",
258
258
  "html-to-markdown-rs",
@@ -266,9 +266,9 @@ dependencies = [
266
266
 
267
267
  [[package]]
268
268
  name = "html-to-markdown-rs"
269
- version = "3.17.2"
269
+ version = "3.18.0"
270
270
  source = "registry+https://github.com/rust-lang/crates.io-index"
271
- checksum = "ee5ad2da135929dd837dbbe626ce6ba3360b9e5bd11ab197048f9896a5c6846f"
271
+ checksum = "6f656348dddd7b560bbfc40f3c1010974baebb614260705cac492a71da4e39b8"
272
272
  dependencies = [
273
273
  "ahash",
274
274
  "astral-tl",
@@ -855,14 +855,14 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
855
855
  dependencies = [
856
856
  "proc-macro2",
857
857
  "quote",
858
- "syn 3.0.6",
858
+ "syn 3.0.9",
859
859
  ]
860
860
 
861
861
  [[package]]
862
862
  name = "serde_json"
863
- version = "1.0.151"
863
+ version = "1.0.154"
864
864
  source = "registry+https://github.com/rust-lang/crates.io-index"
865
- checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
865
+ checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"
866
866
  dependencies = [
867
867
  "itoa",
868
868
  "memchr",
@@ -897,9 +897,9 @@ checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"
897
897
 
898
898
  [[package]]
899
899
  name = "smallvec"
900
- version = "1.16.2"
900
+ version = "1.16.3"
901
901
  source = "registry+https://github.com/rust-lang/crates.io-index"
902
- checksum = "f9395f0f0eee849a9b707b2f06bb92a6a422090e2123bb2ef8e87a0e61892a8e"
902
+ checksum = "5b3dc8af474f516a851ff4bd12db780f948b9250ad37211e4eec0bccea54e01b"
903
903
 
904
904
  [[package]]
905
905
  name = "stable_deref_trait"
@@ -944,9 +944,9 @@ dependencies = [
944
944
 
945
945
  [[package]]
946
946
  name = "syn"
947
- version = "3.0.6"
947
+ version = "3.0.9"
948
948
  source = "registry+https://github.com/rust-lang/crates.io-index"
949
- checksum = "8593e8e72159ed2257d083c7a454a85cbf854f37a0966d8d483aff8c8a3ebcee"
949
+ checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
950
950
  dependencies = [
951
951
  "proc-macro2",
952
952
  "quote",
@@ -961,7 +961,7 @@ checksum = "901704edd0dfe137f1987838ee4f259e4e063c31371bdb423f7ae38ec6f77f02"
961
961
  dependencies = [
962
962
  "proc-macro2",
963
963
  "quote",
964
- "syn 3.0.6",
964
+ "syn 3.0.9",
965
965
  ]
966
966
 
967
967
  [[package]]
@@ -990,7 +990,7 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"
990
990
  dependencies = [
991
991
  "proc-macro2",
992
992
  "quote",
993
- "syn 3.0.6",
993
+ "syn 3.0.9",
994
994
  ]
995
995
 
996
996
  [[package]]
@@ -1054,9 +1054,9 @@ dependencies = [
1054
1054
 
1055
1055
  [[package]]
1056
1056
  name = "unicode-ident"
1057
- version = "1.0.26"
1057
+ version = "1.0.27"
1058
1058
  source = "registry+https://github.com/rust-lang/crates.io-index"
1059
- checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"
1059
+ checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"
1060
1060
 
1061
1061
  [[package]]
1062
1062
  name = "url"
@@ -1137,7 +1137,7 @@ checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
1137
1137
  dependencies = [
1138
1138
  "proc-macro2",
1139
1139
  "quote",
1140
- "syn 3.0.6",
1140
+ "syn 3.0.9",
1141
1141
  "synstructure",
1142
1142
  ]
1143
1143
 
@@ -1178,7 +1178,7 @@ checksum = "f75b4683f6c7f45248d4d64056a24298c6281e0993356d7d1b4a1a962ef10d4a"
1178
1178
  dependencies = [
1179
1179
  "proc-macro2",
1180
1180
  "quote",
1181
- "syn 3.0.6",
1181
+ "syn 3.0.9",
1182
1182
  "synstructure",
1183
1183
  ]
1184
1184
 
@@ -1212,7 +1212,7 @@ checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da"
1212
1212
  dependencies = [
1213
1213
  "proc-macro2",
1214
1214
  "quote",
1215
- "syn 3.0.6",
1215
+ "syn 3.0.9",
1216
1216
  ]
1217
1217
 
1218
1218
  [[package]]
@@ -1,12 +1,13 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:f29500544ddc9797aae5ac0c0fe985ebd2bd5d7c2be2faae8e67fb5150856edd
2
+ # alef:hash:37404ec17f542478901d5343287fc2328153ec9c68cdeb01c220de1d8799cf6e
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
6
6
  [package]
7
7
  name = "html-to-markdown-rb"
8
- version = "3.17.2"
8
+ version = "3.18.0"
9
9
  edition = "2024"
10
+ authors = ["Na'aman Hirschfeld <naaman@xberg.io>", "Tobias Perlstein <tobias@xberg.io>"]
10
11
  license = "MIT"
11
12
  description = "High-performance HTML to Markdown converter"
12
13
  readme = false
@@ -30,7 +31,7 @@ visitor = ["html-to-markdown-rs/visitor"]
30
31
 
31
32
  [dependencies]
32
33
  async-trait = "0.1"
33
- html-to-markdown-rs = { version = "3.17.2", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
34
+ html-to-markdown-rs = { version = "3.18.0", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
34
35
  magnus = "0.9"
35
36
  rb-sys = ">=0.9.130, <0.10"
36
37
  serde = { version = "1", features = ["derive"] }
@@ -39,11 +40,9 @@ tokio = { version = "1", features = ["rt-multi-thread"] }
39
40
  tracing = "0.1"
40
41
 
41
42
  # This crate deliberately does not use `[lints]` / `workspace = true`: its C-ABI /
42
- # PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code, and the workspace's
43
- # `[workspace.lints.rust]` sets `unsafe_code = "deny"` -- an all-or-nothing table that
44
- # would turn every such boundary into a compile error. The `[lints.clippy]` block below
45
- # instead carries the subset of the workspace's deny-by-default lint policy this crate
46
- # can actually satisfy. ~keep
43
+ # PyO3 / napi / ext-php-rs / NIF boundary requires `unsafe` code. Local lint tables
44
+ # avoid inheriting workspace policies that could reject these boundaries, and select
45
+ # the lints this binding can actually satisfy. ~keep
47
46
  [lints.clippy]
48
47
  dbg_macro = "deny"
49
48
  print_stderr = "deny"
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:d5974922982c4a533f5e1f202d897cb89a0544519b7fbcb4ab5b198735e7fec1
2
+ // alef:hash:b6d61bd5ff22300c6e6fbed28fdf0552577fb61799af32cc2d7a7244ab333361
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -73,6 +73,8 @@ pub struct ConversionOptions {
73
73
  escape_ascii: bool,
74
74
  code_language: String,
75
75
  autolinks: bool,
76
+ expand_abbreviations: bool,
77
+ include_blockquote_citations: bool,
76
78
  default_title: bool,
77
79
  br_in_tables: bool,
78
80
  compact_tables: bool,
@@ -95,6 +97,7 @@ pub struct ConversionOptions {
95
97
  preserve_tags: Vec<String>,
96
98
  skip_images: bool,
97
99
  inline_data_media: InlineDataMedia,
100
+ hidden_content: HiddenContent,
98
101
  url_escape_style: UrlEscapeStyle,
99
102
  link_style: LinkStyle,
100
103
  output_format: OutputFormat,
@@ -250,6 +253,24 @@ impl ConversionOptions {
250
253
  })?,
251
254
  None => true,
252
255
  },
256
+ expand_abbreviations: match kwargs.get(ruby.to_symbol("expand_abbreviations")) {
257
+ Some(v) => bool::try_convert(v).map_err(|e| {
258
+ magnus::Error::new(
259
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
260
+ format!("invalid value for `expand_abbreviations`: {}", e),
261
+ )
262
+ })?,
263
+ None => true,
264
+ },
265
+ include_blockquote_citations: match kwargs.get(ruby.to_symbol("include_blockquote_citations")) {
266
+ Some(v) => bool::try_convert(v).map_err(|e| {
267
+ magnus::Error::new(
268
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
269
+ format!("invalid value for `include_blockquote_citations`: {}", e),
270
+ )
271
+ })?,
272
+ None => true,
273
+ },
253
274
  default_title: match kwargs.get(ruby.to_symbol("default_title")) {
254
275
  Some(v) => bool::try_convert(v).map_err(|e| {
255
276
  magnus::Error::new(
@@ -448,6 +469,15 @@ impl ConversionOptions {
448
469
  })?,
449
470
  None => InlineDataMedia::Keep,
450
471
  },
472
+ hidden_content: match kwargs.get(ruby.to_symbol("hidden_content")) {
473
+ Some(v) => HiddenContent::try_convert(v).map_err(|e| {
474
+ magnus::Error::new(
475
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
476
+ format!("invalid value for `hidden_content`: {}", e),
477
+ )
478
+ })?,
479
+ None => HiddenContent::Drop,
480
+ },
451
481
  url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")) {
452
482
  Some(v) => UrlEscapeStyle::try_convert(v).map_err(|e| {
453
483
  magnus::Error::new(
@@ -612,6 +642,14 @@ impl ConversionOptions {
612
642
  self.autolinks
613
643
  }
614
644
 
645
+ fn expand_abbreviations(&self) -> bool {
646
+ self.expand_abbreviations
647
+ }
648
+
649
+ fn include_blockquote_citations(&self) -> bool {
650
+ self.include_blockquote_citations
651
+ }
652
+
615
653
  fn default_title(&self) -> bool {
616
654
  self.default_title
617
655
  }
@@ -700,6 +738,10 @@ impl ConversionOptions {
700
738
  self.inline_data_media.clone()
701
739
  }
702
740
 
741
+ fn hidden_content(&self) -> HiddenContent {
742
+ self.hidden_content.clone()
743
+ }
744
+
703
745
  fn url_escape_style(&self) -> UrlEscapeStyle {
704
746
  self.url_escape_style.clone()
705
747
  }
@@ -768,6 +810,8 @@ pub struct ConversionOptionsUpdate {
768
810
  escape_ascii: Option<bool>,
769
811
  code_language: Option<String>,
770
812
  autolinks: Option<bool>,
813
+ expand_abbreviations: Option<bool>,
814
+ include_blockquote_citations: Option<bool>,
771
815
  default_title: Option<bool>,
772
816
  br_in_tables: Option<bool>,
773
817
  compact_tables: Option<bool>,
@@ -790,6 +834,7 @@ pub struct ConversionOptionsUpdate {
790
834
  preserve_tags: Option<Vec<String>>,
791
835
  skip_images: Option<bool>,
792
836
  inline_data_media: Option<InlineDataMedia>,
837
+ hidden_content: Option<HiddenContent>,
793
838
  url_escape_style: Option<UrlEscapeStyle>,
794
839
  link_style: Option<LinkStyle>,
795
840
  output_format: Option<OutputFormat>,
@@ -945,6 +990,30 @@ impl ConversionOptionsUpdate {
945
990
  })?),
946
991
  None => None,
947
992
  },
993
+ expand_abbreviations: match kwargs
994
+ .get(ruby.to_symbol("expand_abbreviations"))
995
+ .filter(|v| !v.is_nil())
996
+ {
997
+ Some(v) => Some(bool::try_convert(v).map_err(|e| {
998
+ magnus::Error::new(
999
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1000
+ format!("invalid value for `expand_abbreviations`: {}", e),
1001
+ )
1002
+ })?),
1003
+ None => None,
1004
+ },
1005
+ include_blockquote_citations: match kwargs
1006
+ .get(ruby.to_symbol("include_blockquote_citations"))
1007
+ .filter(|v| !v.is_nil())
1008
+ {
1009
+ Some(v) => Some(bool::try_convert(v).map_err(|e| {
1010
+ magnus::Error::new(
1011
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1012
+ format!("invalid value for `include_blockquote_citations`: {}", e),
1013
+ )
1014
+ })?),
1015
+ None => None,
1016
+ },
948
1017
  default_title: match kwargs.get(ruby.to_symbol("default_title")).filter(|v| !v.is_nil()) {
949
1018
  Some(v) => Some(bool::try_convert(v).map_err(|e| {
950
1019
  magnus::Error::new(
@@ -1146,6 +1215,15 @@ impl ConversionOptionsUpdate {
1146
1215
  })?),
1147
1216
  None => None,
1148
1217
  },
1218
+ hidden_content: match kwargs.get(ruby.to_symbol("hidden_content")).filter(|v| !v.is_nil()) {
1219
+ Some(v) => Some(HiddenContent::try_convert(v).map_err(|e| {
1220
+ magnus::Error::new(
1221
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1222
+ format!("invalid value for `hidden_content`: {}", e),
1223
+ )
1224
+ })?),
1225
+ None => None,
1226
+ },
1149
1227
  url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")).filter(|v| !v.is_nil()) {
1150
1228
  Some(v) => Some(UrlEscapeStyle::try_convert(v).map_err(|e| {
1151
1229
  magnus::Error::new(
@@ -1313,6 +1391,14 @@ impl ConversionOptionsUpdate {
1313
1391
  self.autolinks
1314
1392
  }
1315
1393
 
1394
+ fn expand_abbreviations(&self) -> Option<bool> {
1395
+ self.expand_abbreviations
1396
+ }
1397
+
1398
+ fn include_blockquote_citations(&self) -> Option<bool> {
1399
+ self.include_blockquote_citations
1400
+ }
1401
+
1316
1402
  fn default_title(&self) -> Option<bool> {
1317
1403
  self.default_title
1318
1404
  }
@@ -1401,6 +1487,10 @@ impl ConversionOptionsUpdate {
1401
1487
  self.inline_data_media.clone()
1402
1488
  }
1403
1489
 
1490
+ fn hidden_content(&self) -> Option<HiddenContent> {
1491
+ self.hidden_content.clone()
1492
+ }
1493
+
1404
1494
  fn url_escape_style(&self) -> Option<UrlEscapeStyle> {
1405
1495
  self.url_escape_style.clone()
1406
1496
  }
@@ -3866,6 +3956,58 @@ impl magnus::TryConvert for HeadingStyle {
3866
3956
  unsafe impl IntoValueFromNative for HeadingStyle {}
3867
3957
  unsafe impl TryConvertOwned for HeadingStyle {}
3868
3958
 
3959
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
3960
+ pub enum HiddenContent {
3961
+ Drop,
3962
+ Reachable,
3963
+ All,
3964
+ }
3965
+
3966
+ impl Default for HiddenContent {
3967
+ fn default() -> Self {
3968
+ Self::Drop
3969
+ }
3970
+ }
3971
+
3972
+ impl magnus::IntoValue for HiddenContent {
3973
+ fn into_value_with(self, handle: &Ruby) -> magnus::Value {
3974
+ let sym = match self {
3975
+ HiddenContent::Drop => "Drop",
3976
+ HiddenContent::Reachable => "Reachable",
3977
+ HiddenContent::All => "All",
3978
+ };
3979
+ handle.to_symbol(sym).into_value_with(handle)
3980
+ }
3981
+ }
3982
+
3983
+ impl magnus::TryConvert for HiddenContent {
3984
+ fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
3985
+ // IntoValue emits Symbols, including when this enum is a Hash key.
3986
+ // Accept that exact representation as well as String inputs; do not
3987
+ // coerce arbitrary objects through to_s.
3988
+ let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
3989
+ symbol.name()?.into_owned()
3990
+ } else {
3991
+ magnus::TryConvert::try_convert(val)?
3992
+ };
3993
+ // Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
3994
+ // emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
3995
+ // existing consumer code written in any of those styles keep working.
3996
+ match s.as_str() {
3997
+ "Drop" | "drop" => Ok(HiddenContent::Drop),
3998
+ "Reachable" | "reachable" => Ok(HiddenContent::Reachable),
3999
+ "All" | "all" => Ok(HiddenContent::All),
4000
+ other => Err(magnus::Error::new(
4001
+ unsafe { Ruby::get_unchecked() }.exception_arg_error(),
4002
+ format!("invalid HiddenContent value: {other}"),
4003
+ )),
4004
+ }
4005
+ }
4006
+ }
4007
+
4008
+ unsafe impl IntoValueFromNative for HiddenContent {}
4009
+ unsafe impl TryConvertOwned for HiddenContent {}
4010
+
3869
4011
  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
3870
4012
  pub enum HighlightStyle {
3871
4013
  DoubleEqual,
@@ -6904,6 +7046,8 @@ impl From<ConversionOptions> for html_to_markdown_rs::options::ConversionOptions
6904
7046
  escape_ascii: val.escape_ascii,
6905
7047
  code_language: val.code_language,
6906
7048
  autolinks: val.autolinks,
7049
+ expand_abbreviations: val.expand_abbreviations,
7050
+ include_blockquote_citations: val.include_blockquote_citations,
6907
7051
  default_title: val.default_title,
6908
7052
  br_in_tables: val.br_in_tables,
6909
7053
  compact_tables: val.compact_tables,
@@ -6926,6 +7070,7 @@ impl From<ConversionOptions> for html_to_markdown_rs::options::ConversionOptions
6926
7070
  preserve_tags: val.preserve_tags.into_iter().collect(),
6927
7071
  skip_images: val.skip_images,
6928
7072
  inline_data_media: val.inline_data_media.into(),
7073
+ hidden_content: val.hidden_content.into(),
6929
7074
  url_escape_style: val.url_escape_style.into(),
6930
7075
  link_style: val.link_style.into(),
6931
7076
  output_format: val.output_format.into(),
@@ -6959,6 +7104,8 @@ impl From<html_to_markdown_rs::options::ConversionOptions> for ConversionOptions
6959
7104
  escape_ascii: val.escape_ascii,
6960
7105
  code_language: val.code_language.to_string(),
6961
7106
  autolinks: val.autolinks,
7107
+ expand_abbreviations: val.expand_abbreviations,
7108
+ include_blockquote_citations: val.include_blockquote_citations,
6962
7109
  default_title: val.default_title,
6963
7110
  br_in_tables: val.br_in_tables,
6964
7111
  compact_tables: val.compact_tables,
@@ -6981,6 +7128,7 @@ impl From<html_to_markdown_rs::options::ConversionOptions> for ConversionOptions
6981
7128
  preserve_tags: val.preserve_tags.into_iter().collect(),
6982
7129
  skip_images: val.skip_images,
6983
7130
  inline_data_media: val.inline_data_media.into(),
7131
+ hidden_content: val.hidden_content.into(),
6984
7132
  url_escape_style: val.url_escape_style.into(),
6985
7133
  link_style: val.link_style.into(),
6986
7134
  output_format: val.output_format.into(),
@@ -7013,6 +7161,8 @@ impl From<html_to_markdown_rs::options::ConversionOptionsUpdate> for ConversionO
7013
7161
  escape_ascii: val.escape_ascii,
7014
7162
  code_language: val.code_language.map(|v| v.to_string()),
7015
7163
  autolinks: val.autolinks,
7164
+ expand_abbreviations: val.expand_abbreviations,
7165
+ include_blockquote_citations: val.include_blockquote_citations,
7016
7166
  default_title: val.default_title,
7017
7167
  br_in_tables: val.br_in_tables,
7018
7168
  compact_tables: val.compact_tables,
@@ -7035,6 +7185,7 @@ impl From<html_to_markdown_rs::options::ConversionOptionsUpdate> for ConversionO
7035
7185
  preserve_tags: val.preserve_tags.map(|v| v.into_iter().collect()),
7036
7186
  skip_images: val.skip_images,
7037
7187
  inline_data_media: val.inline_data_media.map(Into::into),
7188
+ hidden_content: val.hidden_content.map(Into::into),
7038
7189
  url_escape_style: val.url_escape_style.map(Into::into),
7039
7190
  link_style: val.link_style.map(Into::into),
7040
7191
  output_format: val.output_format.map(Into::into),
@@ -7627,6 +7778,26 @@ impl From<html_to_markdown_rs::options::HeadingStyle> for HeadingStyle {
7627
7778
  }
7628
7779
  }
7629
7780
 
7781
+ impl From<HiddenContent> for html_to_markdown_rs::options::HiddenContent {
7782
+ fn from(val: HiddenContent) -> Self {
7783
+ match val {
7784
+ HiddenContent::Drop => Self::Drop,
7785
+ HiddenContent::Reachable => Self::Reachable,
7786
+ HiddenContent::All => Self::All,
7787
+ }
7788
+ }
7789
+ }
7790
+
7791
+ impl From<html_to_markdown_rs::options::HiddenContent> for HiddenContent {
7792
+ fn from(val: html_to_markdown_rs::options::HiddenContent) -> Self {
7793
+ match val {
7794
+ html_to_markdown_rs::options::HiddenContent::Drop => Self::Drop,
7795
+ html_to_markdown_rs::options::HiddenContent::Reachable => Self::Reachable,
7796
+ html_to_markdown_rs::options::HiddenContent::All => Self::All,
7797
+ }
7798
+ }
7799
+ }
7800
+
7630
7801
  impl From<HighlightStyle> for html_to_markdown_rs::options::HighlightStyle {
7631
7802
  fn from(val: HighlightStyle) -> Self {
7632
7803
  match val {
@@ -8289,6 +8460,16 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8289
8460
 
8290
8461
  class.define_method("autolinks", method!(ConversionOptions::autolinks, 0))?;
8291
8462
 
8463
+ class.define_method(
8464
+ "expand_abbreviations",
8465
+ method!(ConversionOptions::expand_abbreviations, 0),
8466
+ )?;
8467
+
8468
+ class.define_method(
8469
+ "include_blockquote_citations",
8470
+ method!(ConversionOptions::include_blockquote_citations, 0),
8471
+ )?;
8472
+
8292
8473
  class.define_method("default_title", method!(ConversionOptions::default_title, 0))?;
8293
8474
 
8294
8475
  class.define_method("br_in_tables", method!(ConversionOptions::br_in_tables, 0))?;
@@ -8336,6 +8517,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8336
8517
 
8337
8518
  class.define_method("inline_data_media", method!(ConversionOptions::inline_data_media, 0))?;
8338
8519
 
8520
+ class.define_method("hidden_content", method!(ConversionOptions::hidden_content, 0))?;
8521
+
8339
8522
  class.define_method("url_escape_style", method!(ConversionOptions::url_escape_style, 0))?;
8340
8523
 
8341
8524
  class.define_method("link_style", method!(ConversionOptions::link_style, 0))?;
@@ -8406,6 +8589,16 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8406
8589
 
8407
8590
  class.define_method("autolinks", method!(ConversionOptionsUpdate::autolinks, 0))?;
8408
8591
 
8592
+ class.define_method(
8593
+ "expand_abbreviations",
8594
+ method!(ConversionOptionsUpdate::expand_abbreviations, 0),
8595
+ )?;
8596
+
8597
+ class.define_method(
8598
+ "include_blockquote_citations",
8599
+ method!(ConversionOptionsUpdate::include_blockquote_citations, 0),
8600
+ )?;
8601
+
8409
8602
  class.define_method("default_title", method!(ConversionOptionsUpdate::default_title, 0))?;
8410
8603
 
8411
8604
  class.define_method("br_in_tables", method!(ConversionOptionsUpdate::br_in_tables, 0))?;
@@ -8465,6 +8658,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8465
8658
  method!(ConversionOptionsUpdate::inline_data_media, 0),
8466
8659
  )?;
8467
8660
 
8661
+ class.define_method("hidden_content", method!(ConversionOptionsUpdate::hidden_content, 0))?;
8662
+
8468
8663
  class.define_method(
8469
8664
  "url_escape_style",
8470
8665
  method!(ConversionOptionsUpdate::url_escape_style, 0),
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:ed710ec2aeab911b74dddf4037577629ccf2956fa564ec5ea937f4896b410f2e
2
+ # alef:hash:cb5cbf190f88bf6a323a1ec47bfe2fba72d926990bfc46b3eb37cc3375c6715b
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module HtmlToMarkdown
8
8
  ## The version string for this package.
9
- VERSION = "3.17.2"
9
+ VERSION = "3.18.0"
10
10
  end
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:622a87d08343ba4489b9f55f6d1f41fec2db28a92968c81276f59faf488ecbdb
2
+ # alef:hash:7e44e5dc91835ebf404d75449ed2551d0fa980cdfa15ba6064871d3aa3ecde5b
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -21,6 +21,8 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
21
21
  attr_reader escape_ascii: bool
22
22
  attr_reader code_language: String
23
23
  attr_reader autolinks: bool
24
+ attr_reader expand_abbreviations: bool
25
+ attr_reader include_blockquote_citations: bool
24
26
  attr_reader default_title: bool
25
27
  attr_reader br_in_tables: bool
26
28
  attr_reader compact_tables: bool
@@ -43,6 +45,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
43
45
  attr_reader preserve_tags: Array[String]
44
46
  attr_reader skip_images: bool
45
47
  attr_reader inline_data_media: enum_InlineDataMedia
48
+ attr_reader hidden_content: enum_HiddenContent
46
49
  attr_reader url_escape_style: enum_UrlEscapeStyle
47
50
  attr_reader link_style: enum_LinkStyle
48
51
  attr_reader output_format: enum_OutputFormat
@@ -58,7 +61,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
58
61
  attr_reader base_url: String?
59
62
  attr_reader visitor: VisitorHandle?
60
63
 
61
- def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?max_input_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String, ?visitor: VisitorHandle) -> void
64
+ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?expand_abbreviations: bool, ?include_blockquote_citations: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptions, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?hidden_content: enum_HiddenContent, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?max_input_size: Integer, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String, ?visitor: VisitorHandle) -> void
62
65
  end
63
66
 
64
67
  class ConversionOptionsUpdate
@@ -73,6 +76,8 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
73
76
  attr_reader escape_ascii: bool?
74
77
  attr_reader code_language: String?
75
78
  attr_reader autolinks: bool?
79
+ attr_reader expand_abbreviations: bool?
80
+ attr_reader include_blockquote_citations: bool?
76
81
  attr_reader default_title: bool?
77
82
  attr_reader br_in_tables: bool?
78
83
  attr_reader compact_tables: bool?
@@ -95,6 +100,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
95
100
  attr_reader preserve_tags: Array[String]?
96
101
  attr_reader skip_images: bool?
97
102
  attr_reader inline_data_media: enum_InlineDataMedia?
103
+ attr_reader hidden_content: enum_HiddenContent?
98
104
  attr_reader url_escape_style: enum_UrlEscapeStyle?
99
105
  attr_reader link_style: enum_LinkStyle?
100
106
  attr_reader output_format: enum_OutputFormat?
@@ -110,7 +116,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
110
116
  attr_reader base_url: String?
111
117
  attr_reader visitor: VisitorHandle?
112
118
 
113
- def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptionsUpdate, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?max_input_size: Integer?, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer?, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String?, ?visitor: VisitorHandle) -> void
119
+ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_ListIndentType, ?list_indent_width: Integer, ?bullets: String, ?strong_em_symbol: String, ?escape_asterisks: bool, ?escape_underscores: bool, ?escape_misc: bool, ?escape_ascii: bool, ?code_language: String, ?autolinks: bool, ?expand_abbreviations: bool, ?include_blockquote_citations: bool, ?default_title: bool, ?br_in_tables: bool, ?compact_tables: bool, ?highlight_style: enum_HighlightStyle, ?extract_metadata: bool, ?whitespace_mode: enum_WhitespaceMode, ?strip_newlines: bool, ?wrap: bool, ?wrap_width: Integer, ?convert_as_inline: bool, ?sub_symbol: String, ?sup_symbol: String, ?newline_style: enum_NewlineStyle, ?code_block_style: enum_CodeBlockStyle, ?keep_inline_images_in: Array[String], ?preprocessing: PreprocessingOptionsUpdate, ?encoding: String, ?debug: bool, ?strip_tags: Array[String], ?preserve_tags: Array[String], ?skip_images: bool, ?inline_data_media: enum_InlineDataMedia, ?hidden_content: enum_HiddenContent, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_size: Integer, ?max_input_size: Integer?, ?capture_svg: bool, ?infer_dimensions: bool, ?max_depth: Integer?, ?exclude_selectors: Array[String], ?tier_strategy: enum_TierStrategy, ?base_url: String?, ?visitor: VisitorHandle) -> void
114
120
  end
115
121
 
116
122
  class ConversionResult
@@ -304,6 +310,8 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
304
310
 
305
311
  type enum_HeadingStyle = :Underlined | :Atx | :AtxClosed
306
312
 
313
+ type enum_HiddenContent = :Drop | :Reachable | :All
314
+
307
315
  type enum_HighlightStyle = :DoubleEqual | :Html | :Bold | :None
308
316
 
309
317
  type enum_ImageType = :data_uri | :inline_svg | :external | :relative
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-to-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.17.2
4
+ version: 3.18.0
5
5
  platform: ruby
6
6
  authors:
7
- - Na'aman Hirschfeld <naaman@xberg.io>
7
+ - Na'aman Hirschfeld
8
+ - Tobias Perlstein
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2026-10-06 00:00:00.000000000 Z
12
+ date: 2026-10-15 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: rb_sys
@@ -36,16 +37,18 @@ dependencies:
36
37
  requirements:
37
38
  - - "~>"
38
39
  - !ruby/object:Gem::Version
39
- version: '0.5'
40
+ version: '0.6'
40
41
  type: :runtime
41
42
  prerelease: false
42
43
  version_requirements: !ruby/object:Gem::Requirement
43
44
  requirements:
44
45
  - - "~>"
45
46
  - !ruby/object:Gem::Version
46
- version: '0.5'
47
+ version: '0.6'
47
48
  description: High-performance HTML to Markdown converter
48
49
  email:
50
+ - naaman@xberg.io
51
+ - tobias@xberg.io
49
52
  executables: []
50
53
  extensions:
51
54
  - ext/html_to_markdown_rb/native/extconf.rb