html-to-markdown 3.16.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: 8de853571f92ca7f37774b63db6d2348c505919cd43b9fb25b250a2a21206b8f
4
- data.tar.gz: efd5431417618cecdf86c8a4f00fd4456c71c441dae449d28e967244d6ef023e
3
+ metadata.gz: 19c0e5729d5ff67d2a50d6686184cbd9e7a374c5213a1eb3bf10d0b98867471c
4
+ data.tar.gz: c647a47e588b194566216244edf2868d1dbfeb3afd164486a291702e82569230
5
5
  SHA512:
6
- metadata.gz: ae9e03f4cf1e5177f4ff86edf3bc88779a12eb4ed184128b5c4d2ed5d60bdceed2fb10df37075e1ab643c05c69229543216a5e267074ee95823e70f834188216
7
- data.tar.gz: 337c1ada4ab8b534b62b822fef53e9ce605561a40483a975799a2b9afa9a304d8654f5b7dce3924c15bc22a3a823f008603a2840ca57321b8955acc89e7b3066
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.16.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.16.0"
269
+ version = "3.17.0"
270
270
  source = "registry+https://github.com/rust-lang/crates.io-index"
271
- checksum = "74c4d770081ede1c6ec100e61a57cac65bf41d28ab5516b1eae907b9f3415778"
271
+ checksum = "0db3dbcfadba084ba535dab4bacee745d8d819d3161be64bda0f5f49c7ad81ed"
272
272
  dependencies = [
273
273
  "ahash",
274
274
  "astral-tl",
@@ -454,9 +454,9 @@ 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.1"
494
+ version = "0.9.2"
495
495
  source = "registry+https://github.com/rust-lang/crates.io-index"
496
- checksum = "4c01bef153b8d0f086991f0e166474a1d57b738221f9a9c11405d498ac95a44d"
496
+ checksum = "b9068710e00d21be762edca59b9c4c8946dbdb29820d4f76ad559afea07982c9"
497
497
  dependencies = [
498
498
  "magnus-macros",
499
499
  "rb-sys",
@@ -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
  ]
@@ -1,11 +1,11 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:b55cf956fd88e14111a54d783edfd335d4ab5ae57ebcc23cdddbb67a1ee0dc96
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.16.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.16.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:ef17e73c4a8ab3ab7874d1b469b3b0bfa02b61db141c8db6976ce5dd46217c8f
2
+ // alef:hash:d5974922982c4a533f5e1f202d897cb89a0544519b7fbcb4ab5b198735e7fec1
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -101,6 +101,7 @@ pub struct ConversionOptions {
101
101
  include_document_structure: bool,
102
102
  extract_images: bool,
103
103
  max_image_size: u64,
104
+ max_input_size: Option<u64>,
104
105
  capture_svg: bool,
105
106
  infer_dimensions: bool,
106
107
  max_depth: Option<usize>,
@@ -501,6 +502,15 @@ impl ConversionOptions {
501
502
  })?,
502
503
  None => 5242880,
503
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
+ },
504
514
  capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")) {
505
515
  Some(v) => bool::try_convert(v).map_err(|e| {
506
516
  magnus::Error::new(
@@ -714,6 +724,10 @@ impl ConversionOptions {
714
724
  self.max_image_size
715
725
  }
716
726
 
727
+ fn max_input_size(&self) -> Option<u64> {
728
+ self.max_input_size
729
+ }
730
+
717
731
  fn capture_svg(&self) -> bool {
718
732
  self.capture_svg
719
733
  }
@@ -782,6 +796,7 @@ pub struct ConversionOptionsUpdate {
782
796
  include_document_structure: Option<bool>,
783
797
  extract_images: Option<bool>,
784
798
  max_image_size: Option<u64>,
799
+ max_input_size: Option<u64>,
785
800
  capture_svg: Option<bool>,
786
801
  infer_dimensions: Option<bool>,
787
802
  max_depth: Option<usize>,
@@ -1188,6 +1203,15 @@ impl ConversionOptionsUpdate {
1188
1203
  })?),
1189
1204
  None => None,
1190
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
+ },
1191
1215
  capture_svg: match kwargs.get(ruby.to_symbol("capture_svg")).filter(|v| !v.is_nil()) {
1192
1216
  Some(v) => Some(bool::try_convert(v).map_err(|e| {
1193
1217
  magnus::Error::new(
@@ -1401,6 +1425,10 @@ impl ConversionOptionsUpdate {
1401
1425
  self.max_image_size
1402
1426
  }
1403
1427
 
1428
+ fn max_input_size(&self) -> Option<u64> {
1429
+ self.max_input_size.clone()
1430
+ }
1431
+
1404
1432
  fn capture_svg(&self) -> Option<bool> {
1405
1433
  self.capture_svg
1406
1434
  }
@@ -6904,6 +6932,7 @@ impl From<ConversionOptions> for html_to_markdown_rs::options::ConversionOptions
6904
6932
  include_document_structure: val.include_document_structure,
6905
6933
  extract_images: val.extract_images,
6906
6934
  max_image_size: val.max_image_size,
6935
+ max_input_size: val.max_input_size,
6907
6936
  capture_svg: val.capture_svg,
6908
6937
  infer_dimensions: val.infer_dimensions,
6909
6938
  max_depth: val.max_depth,
@@ -6958,6 +6987,7 @@ impl From<html_to_markdown_rs::options::ConversionOptions> for ConversionOptions
6958
6987
  include_document_structure: val.include_document_structure,
6959
6988
  extract_images: val.extract_images,
6960
6989
  max_image_size: val.max_image_size,
6990
+ max_input_size: val.max_input_size,
6961
6991
  capture_svg: val.capture_svg,
6962
6992
  infer_dimensions: val.infer_dimensions,
6963
6993
  max_depth: val.max_depth,
@@ -7011,6 +7041,7 @@ impl From<html_to_markdown_rs::options::ConversionOptionsUpdate> for ConversionO
7011
7041
  include_document_structure: val.include_document_structure,
7012
7042
  extract_images: val.extract_images,
7013
7043
  max_image_size: val.max_image_size,
7044
+ max_input_size: val.max_input_size.flatten(),
7014
7045
  capture_svg: val.capture_svg,
7015
7046
  infer_dimensions: val.infer_dimensions,
7016
7047
  max_depth: val.max_depth.flatten(),
@@ -8320,6 +8351,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8320
8351
 
8321
8352
  class.define_method("max_image_size", method!(ConversionOptions::max_image_size, 0))?;
8322
8353
 
8354
+ class.define_method("max_input_size", method!(ConversionOptions::max_input_size, 0))?;
8355
+
8323
8356
  class.define_method("capture_svg", method!(ConversionOptions::capture_svg, 0))?;
8324
8357
 
8325
8358
  class.define_method("infer_dimensions", method!(ConversionOptions::infer_dimensions, 0))?;
@@ -8450,6 +8483,8 @@ fn ruby_init(ruby: &Ruby) -> Result<(), Error> {
8450
8483
 
8451
8484
  class.define_method("max_image_size", method!(ConversionOptionsUpdate::max_image_size, 0))?;
8452
8485
 
8486
+ class.define_method("max_input_size", method!(ConversionOptionsUpdate::max_input_size, 0))?;
8487
+
8453
8488
  class.define_method("capture_svg", method!(ConversionOptionsUpdate::capture_svg, 0))?;
8454
8489
 
8455
8490
  class.define_method(
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:9cd1523beb892a6e5eef0c33a956855a8178865245dbf115fe62ed9e618d85ab
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.16.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:7c6e1f7268fd0bfae41495747b5df560e98fa6c7b17ab6e17963ab6c5f8e4e53
2
+ # alef:hash:622a87d08343ba4489b9f55f6d1f41fec2db28a92968c81276f59faf488ecbdb
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify
5
5
 
@@ -49,6 +49,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
49
49
  attr_reader include_document_structure: bool
50
50
  attr_reader extract_images: bool
51
51
  attr_reader max_image_size: Integer
52
+ attr_reader max_input_size: Integer?
52
53
  attr_reader capture_svg: bool
53
54
  attr_reader infer_dimensions: bool
54
55
  attr_reader max_depth: Integer?
@@ -57,7 +58,7 @@ type json_value = Hash[String, untyped] | Array[untyped] | String | Integer | Fl
57
58
  attr_reader base_url: String?
58
59
  attr_reader visitor: VisitorHandle?
59
60
 
60
- 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, ?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
61
62
  end
62
63
 
63
64
  class ConversionOptionsUpdate
@@ -100,6 +101,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
100
101
  attr_reader include_document_structure: bool?
101
102
  attr_reader extract_images: bool?
102
103
  attr_reader max_image_size: Integer?
104
+ attr_reader max_input_size: Integer?
103
105
  attr_reader capture_svg: bool?
104
106
  attr_reader infer_dimensions: bool?
105
107
  attr_reader max_depth: Integer?
@@ -108,7 +110,7 @@ def initialize: (?heading_style: enum_HeadingStyle, ?list_indent_type: enum_List
108
110
  attr_reader base_url: String?
109
111
  attr_reader visitor: VisitorHandle?
110
112
 
111
- 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, ?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
112
114
  end
113
115
 
114
116
  class ConversionResult
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.16.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-10-02 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