html-to-markdown 3.15.0 → 3.17.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: a687f5a155a438defe585a158de533340696013393a2f218052706919574c4b3
4
- data.tar.gz: f153aee57818a7bb4324bc0509a5a3e08ea92e9cf370a639d43969548a9b8064
3
+ metadata.gz: 19c0e5729d5ff67d2a50d6686184cbd9e7a374c5213a1eb3bf10d0b98867471c
4
+ data.tar.gz: c647a47e588b194566216244edf2868d1dbfeb3afd164486a291702e82569230
5
5
  SHA512:
6
- metadata.gz: e76e5f2fe222209b761fd75312c22741eeafff30f41d046f35fdc9bb86fb6a691f812c31cab936c751184504e03c3cb4ca67fae9ca60d0282772f411c4e03543
7
- data.tar.gz: f91b991b15c70926b54d6b8aaf9b4978de3d5a311fc561ca512be9f9df474e03c7de90df4f594871cb02efd7ec100982c1dd65472ba1f323d2428315b426d215
6
+ metadata.gz: b55477714ff3d6335d584bd1dec80a0393eaed59830c361daddb5ed88ee3e97b5f80c047a9b037a6e50fffa03abcdc6d966f59b8d0d832dfad61fd323c7acae4
7
+ data.tar.gz: bcbd361625d98d5e996c636166343544ef3b54808f0d92e8f95f87788779bbdb97aab2282629c2c642e82bbbf66e9de27dcfe90a0b098761f741de168c3a043b
@@ -252,7 +252,7 @@ checksum = "c9356095b4b41197bba32173600e1582792cda618f65d12f68e2e77d273413c5"
252
252
 
253
253
  [[package]]
254
254
  name = "html-to-markdown-rb"
255
- version = "3.15.0"
255
+ version = "3.17.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.15.0"
269
+ version = "3.17.0"
270
270
  source = "registry+https://github.com/rust-lang/crates.io-index"
271
- checksum = "16c7356a39129a282aa7aa92bd8de8aba28cdeb74d6e7321bcc1c232ff123104"
271
+ checksum = "0db3dbcfadba084ba535dab4bacee745d8d819d3161be64bda0f5f49c7ad81ed"
272
272
  dependencies = [
273
273
  "ahash",
274
274
  "astral-tl",
@@ -448,15 +448,15 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
448
448
 
449
449
  [[package]]
450
450
  name = "lazy_static"
451
- version = "1.5.0"
451
+ version = "1.5.1"
452
452
  source = "registry+https://github.com/rust-lang/crates.io-index"
453
- checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
453
+ checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
454
454
 
455
455
  [[package]]
456
456
  name = "libc"
457
- version = "0.2.189"
457
+ version = "0.2.190"
458
458
  source = "registry+https://github.com/rust-lang/crates.io-index"
459
- checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
459
+ checksum = "ce5d3ddc6d3fa000eb1536d85e147bfe31aacaba692ed6a876f95cb7c855be78"
460
460
 
461
461
  [[package]]
462
462
  name = "libloading"
@@ -491,9 +491,9 @@ checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
491
491
 
492
492
  [[package]]
493
493
  name = "magnus"
494
- version = "0.9.0"
494
+ version = "0.9.2"
495
495
  source = "registry+https://github.com/rust-lang/crates.io-index"
496
- checksum = "379d50b6eea4ca84074ccd3e551eb9b07f7865194d5b3198325317e9ef78e5e9"
496
+ checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
497
497
  dependencies = [
498
498
  "magnus-macros",
499
499
  "rb-sys",
@@ -503,9 +503,9 @@ dependencies = [
503
503
 
504
504
  [[package]]
505
505
  name = "magnus-macros"
506
- version = "0.9.0"
506
+ version = "0.9.1"
507
507
  source = "registry+https://github.com/rust-lang/crates.io-index"
508
- checksum = "4ca70566af98184bb92d4d9853daaf533c1a3418b9570d0547ea44970035f3fe"
508
+ checksum = "9dafde2eeb66f090e0f326112323eb8324b12cb32b5d1210e541d3df6b0ce77e"
509
509
  dependencies = [
510
510
  "proc-macro2",
511
511
  "quote",
@@ -1014,9 +1014,9 @@ dependencies = [
1014
1014
 
1015
1015
  [[package]]
1016
1016
  name = "tokio"
1017
- version = "1.53.1"
1017
+ version = "1.53.2"
1018
1018
  source = "registry+https://github.com/rust-lang/crates.io-index"
1019
- checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"
1019
+ checksum = "e95f91fcc7a621e8b030f6aa23c71fe9838ae2fb4d8118b75602a328f5144044"
1020
1020
  dependencies = [
1021
1021
  "pin-project-lite",
1022
1022
  ]
@@ -1131,9 +1131,9 @@ dependencies = [
1131
1131
 
1132
1132
  [[package]]
1133
1133
  name = "yoke-derive"
1134
- version = "0.8.3"
1134
+ version = "0.8.4"
1135
1135
  source = "registry+https://github.com/rust-lang/crates.io-index"
1136
- checksum = "33811428bee40dbceb6d545e95754741d17a6aef9a4849f0fd62e2ba4f412a78"
1136
+ checksum = "ec8ebde2db3681e8c9980cc27822030e68752690ddfa9473e739aeb4dbde6d71"
1137
1137
  dependencies = [
1138
1138
  "proc-macro2",
1139
1139
  "quote",
@@ -1143,18 +1143,18 @@ dependencies = [
1143
1143
 
1144
1144
  [[package]]
1145
1145
  name = "zerocopy"
1146
- version = "0.8.58"
1146
+ version = "0.8.59"
1147
1147
  source = "registry+https://github.com/rust-lang/crates.io-index"
1148
- checksum = "c17e8fafad82b542ff3717217ecdc736231b59e387768c9630123b4ce4d2db44"
1148
+ checksum = "6df92bf3d9227be3d53173901ddbffac2babc27ae50f397776ffd6dc33f800cb"
1149
1149
  dependencies = [
1150
1150
  "zerocopy-derive",
1151
1151
  ]
1152
1152
 
1153
1153
  [[package]]
1154
1154
  name = "zerocopy-derive"
1155
- version = "0.8.58"
1155
+ version = "0.8.59"
1156
1156
  source = "registry+https://github.com/rust-lang/crates.io-index"
1157
- checksum = "595f56e044df4f46a0c9a626f65c3d99eb8488f7e8a8baa12dd76326d9710bf2"
1157
+ checksum = "ac4f328cf2f05d084e496c3e9c3f33ed0a183656a16e1fcec4d464d8373aec82"
1158
1158
  dependencies = [
1159
1159
  "proc-macro2",
1160
1160
  "quote",
@@ -1,11 +1,11 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:7c09d629fcfd674b7909043e4ee6d1a609cdd325f88aeb6590932703d33aa83c
2
+ # alef:hash:fc7b06dbf1f7f4f6c6b3789b4fa618fcfce8a0bf955f98fa408fed99085aaad5
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.15.0"
8
+ version = "3.17.0"
9
9
  edition = "2024"
10
10
  license = "MIT"
11
11
  description = "High-performance HTML to Markdown converter"
@@ -30,7 +30,7 @@ visitor = ["html-to-markdown-rs/visitor"]
30
30
 
31
31
  [dependencies]
32
32
  async-trait = "0.1"
33
- html-to-markdown-rs = { version = "3.15.0", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
33
+ html-to-markdown-rs = { version = "3.17.0", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
34
34
  magnus = "0.9"
35
35
  rb-sys = ">=0.9.130, <0.10"
36
36
  serde = { version = "1", features = ["derive"] }
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:adcf6160cdf7035806744fc3efe8b3116ce330a5c164ade234e6c2fe49fbe748
2
+ // alef:hash:d5974922982c4a533f5e1f202d897cb89a0544519b7fbcb4ab5b198735e7fec1
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -94,12 +94,14 @@ pub struct ConversionOptions {
94
94
  strip_tags: Vec<String>,
95
95
  preserve_tags: Vec<String>,
96
96
  skip_images: bool,
97
+ inline_data_media: InlineDataMedia,
97
98
  url_escape_style: UrlEscapeStyle,
98
99
  link_style: LinkStyle,
99
100
  output_format: OutputFormat,
100
101
  include_document_structure: bool,
101
102
  extract_images: bool,
102
103
  max_image_size: u64,
104
+ max_input_size: Option<u64>,
103
105
  capture_svg: bool,
104
106
  infer_dimensions: bool,
105
107
  max_depth: Option<usize>,
@@ -437,6 +439,15 @@ impl ConversionOptions {
437
439
  })?,
438
440
  None => false,
439
441
  },
442
+ inline_data_media: match kwargs.get(ruby.to_symbol("inline_data_media")) {
443
+ Some(v) => InlineDataMedia::try_convert(v).map_err(|e| {
444
+ magnus::Error::new(
445
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
446
+ format!("invalid value for `inline_data_media`: {}", e),
447
+ )
448
+ })?,
449
+ None => InlineDataMedia::Keep,
450
+ },
440
451
  url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")) {
441
452
  Some(v) => UrlEscapeStyle::try_convert(v).map_err(|e| {
442
453
  magnus::Error::new(
@@ -491,6 +502,15 @@ impl ConversionOptions {
491
502
  })?,
492
503
  None => 5242880,
493
504
  },
505
+ max_input_size: match kwargs.get(ruby.to_symbol("max_input_size")).filter(|v| !v.is_nil()) {
506
+ Some(v) => Some(u64::try_convert(v).map_err(|e| {
507
+ magnus::Error::new(
508
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
509
+ format!("invalid value for `max_input_size`: {}", e),
510
+ )
511
+ })?),
512
+ None => None,
513
+ },
494
514
  capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")) {
495
515
  Some(v) => bool::try_convert(v).map_err(|e| {
496
516
  magnus::Error::new(
@@ -676,6 +696,10 @@ impl ConversionOptions {
676
696
  self.skip_images
677
697
  }
678
698
 
699
+ fn inline_data_media(&self) -> InlineDataMedia {
700
+ self.inline_data_media.clone()
701
+ }
702
+
679
703
  fn url_escape_style(&self) -> UrlEscapeStyle {
680
704
  self.url_escape_style.clone()
681
705
  }
@@ -700,6 +724,10 @@ impl ConversionOptions {
700
724
  self.max_image_size
701
725
  }
702
726
 
727
+ fn max_input_size(&self) -> Option<u64> {
728
+ self.max_input_size
729
+ }
730
+
703
731
  fn capture_svg(&self) -> bool {
704
732
  self.capture_svg
705
733
  }
@@ -761,12 +789,14 @@ pub struct ConversionOptionsUpdate {
761
789
  strip_tags: Option<Vec<String>>,
762
790
  preserve_tags: Option<Vec<String>>,
763
791
  skip_images: Option<bool>,
792
+ inline_data_media: Option<InlineDataMedia>,
764
793
  url_escape_style: Option<UrlEscapeStyle>,
765
794
  link_style: Option<LinkStyle>,
766
795
  output_format: Option<OutputFormat>,
767
796
  include_document_structure: Option<bool>,
768
797
  extract_images: Option<bool>,
769
798
  max_image_size: Option<u64>,
799
+ max_input_size: Option<u64>,
770
800
  capture_svg: Option<bool>,
771
801
  infer_dimensions: Option<bool>,
772
802
  max_depth: Option<usize>,
@@ -1107,6 +1137,15 @@ impl ConversionOptionsUpdate {
1107
1137
  })?),
1108
1138
  None => None,
1109
1139
  },
1140
+ inline_data_media: match kwargs.get(ruby.to_symbol("inline_data_media")).filter(|v| !v.is_nil()) {
1141
+ Some(v) => Some(InlineDataMedia::try_convert(v).map_err(|e| {
1142
+ magnus::Error::new(
1143
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1144
+ format!("invalid value for `inline_data_media`: {}", e),
1145
+ )
1146
+ })?),
1147
+ None => None,
1148
+ },
1110
1149
  url_escape_style: match kwargs.get(ruby.to_symbol("url_escape_style")).filter(|v| !v.is_nil()) {
1111
1150
  Some(v) => Some(UrlEscapeStyle::try_convert(v).map_err(|e| {
1112
1151
  magnus::Error::new(
@@ -1164,6 +1203,15 @@ impl ConversionOptionsUpdate {
1164
1203
  })?),
1165
1204
  None => None,
1166
1205
  },
1206
+ max_input_size: match kwargs.get(ruby.to_symbol("max_input_size")).filter(|v| !v.is_nil()) {
1207
+ Some(v) => Some(u64::try_convert(v).map_err(|e| {
1208
+ magnus::Error::new(
1209
+ unsafe { magnus::Ruby::get_unchecked() }.exception_type_error(),
1210
+ format!("invalid value for `max_input_size`: {}", e),
1211
+ )
1212
+ })?),
1213
+ None => None,
1214
+ },
1167
1215
  capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")).filter(|v| !v.is_nil()) {
1168
1216
  Some(v) => Some(bool::try_convert(v).map_err(|e| {
1169
1217
  magnus::Error::new(
@@ -1349,6 +1397,10 @@ impl ConversionOptionsUpdate {
1349
1397
  self.skip_images
1350
1398
  }
1351
1399
 
1400
+ fn inline_data_media(&self) -> Option<InlineDataMedia> {
1401
+ self.inline_data_media.clone()
1402
+ }
1403
+
1352
1404
  fn url_escape_style(&self) -> Option<UrlEscapeStyle> {
1353
1405
  self.url_escape_style.clone()
1354
1406
  }
@@ -1373,6 +1425,10 @@ impl ConversionOptionsUpdate {
1373
1425
  self.max_image_size
1374
1426
  }
1375
1427
 
1428
+ fn max_input_size(&self) -> Option<u64> {
1429
+ self.max_input_size.clone()
1430
+ }
1431
+
1376
1432
  fn capture_svg(&self) -> Option<bool> {
1377
1433
  self.capture_svg
1378
1434
  }
@@ -3921,6 +3977,58 @@ impl magnus::TryConvert for ImageType {
3921
3977
  unsafe impl IntoValueFromNative for ImageType {}
3922
3978
  unsafe impl TryConvertOwned for ImageType {}
3923
3979
 
3980
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
3981
+ pub enum InlineDataMedia {
3982
+ Keep,
3983
+ AltTextOnly,
3984
+ DropElement,
3985
+ }
3986
+
3987
+ impl Default for InlineDataMedia {
3988
+ fn default() -> Self {
3989
+ Self::Keep
3990
+ }
3991
+ }
3992
+
3993
+ impl magnus::IntoValue for InlineDataMedia {
3994
+ fn into_value_with(self, handle: &Ruby) -> magnus::Value {
3995
+ let sym = match self {
3996
+ InlineDataMedia::Keep => "Keep",
3997
+ InlineDataMedia::AltTextOnly => "AltTextOnly",
3998
+ InlineDataMedia::DropElement => "DropElement",
3999
+ };
4000
+ handle.to_symbol(sym).into_value_with(handle)
4001
+ }
4002
+ }
4003
+
4004
+ impl magnus::TryConvert for InlineDataMedia {
4005
+ fn try_convert(val: magnus::Value) -> Result<Self, magnus::Error> {
4006
+ // IntoValue emits Symbols, including when this enum is a Hash key.
4007
+ // Accept that exact representation as well as String inputs; do not
4008
+ // coerce arbitrary objects through to_s.
4009
+ let s: String = if let Some(symbol) = magnus::Symbol::from_value(val) {
4010
+ symbol.name()?.into_owned()
4011
+ } else {
4012
+ magnus::TryConvert::try_convert(val)?
4013
+ };
4014
+ // Accept the real serde wire value, the legacy always-snake_case symbol Magnus used to
4015
+ // emit unconditionally, and the verbatim PascalCase Rust variant name, so fixtures and
4016
+ // existing consumer code written in any of those styles keep working.
4017
+ match s.as_str() {
4018
+ "Keep" | "keep" => Ok(InlineDataMedia::Keep),
4019
+ "AltTextOnly" | "alt_text_only" => Ok(InlineDataMedia::AltTextOnly),
4020
+ "DropElement" | "drop_element" => Ok(InlineDataMedia::DropElement),
4021
+ other => Err(magnus::Error::new(
4022
+ unsafe { Ruby::get_unchecked() }.exception_arg_error(),
4023
+ format!("invalid InlineDataMedia value: {other}"),
4024
+ )),
4025
+ }
4026
+ }
4027
+ }
4028
+
4029
+ unsafe impl IntoValueFromNative for InlineDataMedia {}
4030
+ unsafe impl TryConvertOwned for InlineDataMedia {}
4031
+
3924
4032
  #[derive(Clone, Copy, PartialEq, Eq, Hash, Debug, serde::Serialize, serde::Deserialize)]
3925
4033
  pub enum LinkStyle {
3926
4034
  Inline,
@@ -6817,12 +6925,14 @@ impl From<ConversionOptions> for html_to_markdown_rs::options::ConversionOptions
6817
6925
  strip_tags: val.strip_tags.into_iter().collect(),
6818
6926
  preserve_tags: val.preserve_tags.into_iter().collect(),
6819
6927
  skip_images: val.skip_images,
6928
+ inline_data_media: val.inline_data_media.into(),
6820
6929
  url_escape_style: val.url_escape_style.into(),
6821
6930
  link_style: val.link_style.into(),
6822
6931
  output_format: val.output_format.into(),
6823
6932
  include_document_structure: val.include_document_structure,
6824
6933
  extract_images: val.extract_images,
6825
6934
  max_image_size: val.max_image_size,
6935
+ max_input_size: val.max_input_size,
6826
6936
  capture_svg: val.capture_svg,
6827
6937
  infer_dimensions: val.infer_dimensions,
6828
6938
  max_depth: val.max_depth,
@@ -6870,12 +6980,14 @@ impl From<html_to_markdown_rs::options::ConversionOptions> for ConversionOptions
6870
6980
  strip_tags: val.strip_tags.into_iter().collect(),
6871
6981
  preserve_tags: val.preserve_tags.into_iter().collect(),
6872
6982
  skip_images: val.skip_images,
6983
+ inline_data_media: val.inline_data_media.into(),
6873
6984
  url_escape_style: val.url_escape_style.into(),
6874
6985
  link_style: val.link_style.into(),
6875
6986
  output_format: val.output_format.into(),
6876
6987
  include_document_structure: val.include_document_structure,
6877
6988
  extract_images: val.extract_images,
6878
6989
  max_image_size: val.max_image_size,
6990
+ max_input_size: val.max_input_size,
6879
6991
  capture_svg: val.capture_svg,
6880
6992
  infer_dimensions: val.infer_dimensions,
6881
6993
  max_depth: val.max_depth,
@@ -6922,12 +7034,14 @@ impl From<html_to_markdown_rs::options::ConversionOptionsUpdate> for ConversionO
6922
7034
  strip_tags: val.strip_tags.map(|v| v.into_iter().collect()),
6923
7035
  preserve_tags: val.preserve_tags.map(|v| v.into_iter().collect()),
6924
7036
  skip_images: val.skip_images,
7037
+ inline_data_media: val.inline_data_media.map(Into::into),
6925
7038
  url_escape_style: val.url_escape_style.map(Into::into),
6926
7039
  link_style: val.link_style.map(Into::into),
6927
7040
  output_format: val.output_format.map(Into::into),
6928
7041
  include_document_structure: val.include_document_structure,
6929
7042
  extract_images: val.extract_images,
6930
7043
  max_image_size: val.max_image_size,
7044
+ max_input_size: val.max_input_size.flatten(),
6931
7045
  capture_svg: val.capture_svg,
6932
7046
  infer_dimensions: val.infer_dimensions,
6933
7047
  max_depth: val.max_depth.flatten(),
@@ -7559,6 +7673,26 @@ impl From<html_to_markdown_rs::metadata::ImageType> for ImageType {
7559
7673
  }
7560
7674
  }
7561
7675
 
7676
+ impl From<InlineDataMedia> for html_to_markdown_rs::options::InlineDataMedia {
7677
+ fn from(val: InlineDataMedia) -> Self {
7678
+ match val {
7679
+ InlineDataMedia::Keep => Self::Keep,
7680
+ InlineDataMedia::AltTextOnly => Self::AltTextOnly,
7681
+ InlineDataMedia::DropElement => Self::DropElement,
7682
+ }
7683
+ }
7684
+ }
7685
+
7686
+ impl From<html_to_markdown_rs::options::InlineDataMedia> for InlineDataMedia {
7687
+ fn from(val: html_to_markdown_rs::options::InlineDataMedia) -> Self {
7688
+ match val {
7689
+ html_to_markdown_rs::options::InlineDataMedia::Keep => Self::Keep,
7690
+ html_to_markdown_rs::options::InlineDataMedia::AltTextOnly => Self::AltTextOnly,
7691
+ html_to_markdown_rs::options::InlineDataMedia::DropElement => Self::DropElement,
7692
+ }
7693
+ }
7694
+ }
7695
+
7562
7696
  impl From<LinkStyle> for html_to_markdown_rs::options::LinkStyle {
7563
7697
  fn from(val: LinkStyle) -> Self {
7564
7698
  match val {
@@ -8200,6 +8334,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8200
8334
 
8201
8335
  class.define_method("skip_images", method!(ConversionOptions::skip_images, 0))?;
8202
8336
 
8337
+ class.define_method("inline_data_media", method!(ConversionOptions::inline_data_media, 0))?;
8338
+
8203
8339
  class.define_method("url_escape_style", method!(ConversionOptions::url_escape_style, 0))?;
8204
8340
 
8205
8341
  class.define_method("link_style", method!(ConversionOptions::link_style, 0))?;
@@ -8215,6 +8351,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8215
8351
 
8216
8352
  class.define_method("max_image_size", method!(ConversionOptions::max_image_size, 0))?;
8217
8353
 
8354
+ class.define_method("max_input_size", method!(ConversionOptions::max_input_size, 0))?;
8355
+
8218
8356
  class.define_method("capture_svg", method!(ConversionOptions::capture_svg, 0))?;
8219
8357
 
8220
8358
  class.define_method("infer_dimensions", method!(ConversionOptions::infer_dimensions, 0))?;
@@ -8322,6 +8460,11 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8322
8460
 
8323
8461
  class.define_method("skip_images", method!(ConversionOptionsUpdate::skip_images, 0))?;
8324
8462
 
8463
+ class.define_method(
8464
+ "inline_data_media",
8465
+ method!(ConversionOptionsUpdate::inline_data_media, 0),
8466
+ )?;
8467
+
8325
8468
  class.define_method(
8326
8469
  "url_escape_style",
8327
8470
  method!(ConversionOptionsUpdate::url_escape_style, 0),
@@ -8340,6 +8483,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8340
8483
 
8341
8484
  class.define_method("max_image_size", method!(ConversionOptionsUpdate::max_image_size, 0))?;
8342
8485
 
8486
+ class.define_method("max_input_size", method!(ConversionOptionsUpdate::max_input_size, 0))?;
8487
+
8343
8488
  class.define_method("capture_svg", method!(ConversionOptionsUpdate::capture_svg, 0))?;
8344
8489
 
8345
8490
  class.define_method(
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:d3db8f2a519dfe0fdc4abb8529bf0e8c4990d6581fa1a04122cce92a730c65d5
2
+ # alef:hash:31cca426bed4cf070e9b4260d3264c73700befe6d2315f631edfc4885e1f3252
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.15.0"
9
+ VERSION = "3.17.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:c5ae0579cda5776e922483b37b6e2a326aa2211bf97a44c9155bb8478aa502d5
2
+ # alef:hash:622a87d08343ba4489b9f55f6d1f41fec2db28a92968c81276f59faf488ecbdb
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -42,12 +42,14 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
42
42
  attr_reader strip_tags: Array[String]
43
43
  attr_reader preserve_tags: Array[String]
44
44
  attr_reader skip_images: bool
45
+ attr_reader inline_data_media: enum_InlineDataMedia
45
46
  attr_reader url_escape_style: enum_UrlEscapeStyle
46
47
  attr_reader link_style: enum_LinkStyle
47
48
  attr_reader output_format: enum_OutputFormat
48
49
  attr_reader include_document_structure: bool
49
50
  attr_reader extract_images: bool
50
51
  attr_reader max_image_size: Integer
52
+ attr_reader max_input_size: Integer?
51
53
  attr_reader capture_svg: bool
52
54
  attr_reader infer_dimensions: bool
53
55
  attr_reader max_depth: Integer?
@@ -56,7 +58,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
56
58
  attr_reader base_url: String?
57
59
  attr_reader visitor: VisitorHandle?
58
60
 
59
- 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, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_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
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
60
62
  end
61
63
 
62
64
  class ConversionOptionsUpdate
@@ -92,12 +94,14 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
92
94
  attr_reader strip_tags: Array[String]?
93
95
  attr_reader preserve_tags: Array[String]?
94
96
  attr_reader skip_images: bool?
97
+ attr_reader inline_data_media: enum_InlineDataMedia?
95
98
  attr_reader url_escape_style: enum_UrlEscapeStyle?
96
99
  attr_reader link_style: enum_LinkStyle?
97
100
  attr_reader output_format: enum_OutputFormat?
98
101
  attr_reader include_document_structure: bool?
99
102
  attr_reader extract_images: bool?
100
103
  attr_reader max_image_size: Integer?
104
+ attr_reader max_input_size: Integer?
101
105
  attr_reader capture_svg: bool?
102
106
  attr_reader infer_dimensions: bool?
103
107
  attr_reader max_depth: Integer?
@@ -106,7 +110,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
106
110
  attr_reader base_url: String?
107
111
  attr_reader visitor: VisitorHandle?
108
112
 
109
- 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, ?url_escape_style: enum_UrlEscapeStyle, ?link_style: enum_LinkStyle, ?output_format: enum_OutputFormat, ?include_document_structure: bool, ?extract_images: bool, ?max_image_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
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
110
114
  end
111
115
 
112
116
  class ConversionResult
@@ -304,6 +308,8 @@ def initialize: (?rows: Integer, ?cols: Integer, ?cells: Array[GridCell]) -> voi
304
308
 
305
309
  type enum_ImageType = :data_uri | :inline_svg | :external | :relative
306
310
 
311
+ type enum_InlineDataMedia = :Keep | :AltTextOnly | :DropElement
312
+
307
313
  type enum_LinkStyle = :Inline | :Reference
308
314
 
309
315
  type enum_LinkType = :anchor | :internal | :external | :email | :phone | :other
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-to-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.15.0
4
+ version: 3.17.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Na'aman Hirschfeld <naaman@xberg.io>
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-26 00:00:00.000000000 Z
11
+ date: 2026-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys