html-to-markdown 3.8.0 → 3.8.2

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: 6314c27add592fae0388a6eeccc4e846a62746a6386e6f7b472372fd6e4d2f85
4
- data.tar.gz: 66444d02778c857d41e92c314b79ce7337b3d0626f279a50bed2ae35545324dc
3
+ metadata.gz: 1d7a7edd4a1918e284d760aadc529b9acfed9a591bdfdbf1f0fc0fd1b904c6ff
4
+ data.tar.gz: 81fe39786ff2525dd7e01e10c458d0ab8fe2300a3eb4df3ca0ea2acc04978736
5
5
  SHA512:
6
- metadata.gz: 45dce06610ee31fb344c5736f8f60d9eb7ef358b233d7093a09e052921b6195e50248f23bb4826e06b25cd3594d0815c32cba41f874815b2ed823c3bd7341b2f
7
- data.tar.gz: bff54861ff7e5a08bc959274a029dfb367fd394d647ebc187354d7b3fe372a798a674b5253706b2fbcdabaf621788a3a7385bd6fc0327f1757dc95a879346732
6
+ metadata.gz: 6666a6669196bfe6f50f54d22837e9f952d78c8c5e622a2b36cc53ae420bbc24730e1f99c2823350d31f91b3191853d9e8ad32ddf443bf0e279637049a07b6a8
7
+ data.tar.gz: a4718bcfce1de0383652d97a6fea991629b6d0d07711f1c8d39a266641a6adf38b9527e7160a9e79c3d69038eb0dfd1ea51a5f8e897e5cb669274943594e95b4
@@ -252,7 +252,7 @@ dependencies = [
252
252
 
253
253
  [[package]]
254
254
  name = "html-to-markdown-rb"
255
- version = "3.7.2"
255
+ version = "3.8.1"
256
256
  dependencies = [
257
257
  "html-to-markdown-rs",
258
258
  "magnus",
@@ -262,7 +262,7 @@ dependencies = [
262
262
 
263
263
  [[package]]
264
264
  name = "html-to-markdown-rs"
265
- version = "3.7.2"
265
+ version = "3.8.1"
266
266
  dependencies = [
267
267
  "ahash",
268
268
  "astral-tl",
@@ -1,7 +1,7 @@
1
1
 
2
2
  [package]
3
3
  name = "html-to-markdown-rb"
4
- version = "3.8.0"
4
+ version = "3.8.2"
5
5
  edition = "2024"
6
6
  license = "MIT"
7
7
  [workspace]
@@ -263,7 +263,7 @@ dependencies = [
263
263
 
264
264
  [[package]]
265
265
  name = "html-to-markdown-rb"
266
- version = "3.8.0"
266
+ version = "3.8.1"
267
267
  dependencies = [
268
268
  "async-trait",
269
269
  "html-to-markdown-rs",
@@ -276,9 +276,9 @@ dependencies = [
276
276
 
277
277
  [[package]]
278
278
  name = "html-to-markdown-rs"
279
- version = "3.8.0"
279
+ version = "3.8.2"
280
280
  source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "da9935e81a6fee38ebbc5a2ca4e9590f99f650ffb8a08734c4115a3e06c3c5d3"
281
+ checksum = "bfb98086035f41cf7bcdb6bd1dab14b118e53b035e003e268698a6003c413fa0"
282
282
  dependencies = [
283
283
  "ahash",
284
284
  "astral-tl",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "html-to-markdown-rb"
3
- version = "3.8.0"
3
+ version = "3.8.1"
4
4
  edition = "2024"
5
5
  license = "MIT"
6
6
  description = "High-performance HTML to Markdown converter"
@@ -9,7 +9,9 @@ keywords = ["converter", "html", "markdown"]
9
9
  categories = []
10
10
 
11
11
  [package.metadata.cargo-machete]
12
- ignored = ["rb-sys"]
12
+ # async-trait / tokio are declared for feature parity but the generated Magnus
13
+ # shim has no direct callsite (same rationale as the pyo3 crate).
14
+ ignored = ["rb-sys", "async-trait", "tokio"]
13
15
 
14
16
  [lib]
15
17
  name = "html_to_markdown_rb"
@@ -25,7 +27,7 @@ visitor = ["html-to-markdown-rs/visitor"]
25
27
 
26
28
  [dependencies]
27
29
  async-trait = "0.1"
28
- html-to-markdown-rs = { version = "3.8.0", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
30
+ html-to-markdown-rs = { version = "3.8.2", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
29
31
  magnus = "0.8"
30
32
  rb-sys = ">=0.9, <0.9.128"
31
33
  serde = { version = "1", features = ["derive"] }
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:411256ebae58a5a5ab1b77fe1f91fe158a88eecdc7709575c93a6e4ed499f324
2
+ // alef:hash:df03cfa1ea58fc063ec7e305db2e9dcdc739bb4b063899fc4750f8584c5bd37e
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -105,19 +105,7 @@ unsafe impl TryConvertOwned for DocumentMetadata {}
105
105
 
106
106
  impl Default for DocumentMetadata {
107
107
  fn default() -> Self {
108
- Self {
109
- title: None,
110
- description: None,
111
- keywords: vec![],
112
- author: None,
113
- canonical_url: None,
114
- base_href: None,
115
- language: None,
116
- text_direction: None,
117
- open_graph: Default::default(),
118
- twitter_card: Default::default(),
119
- meta_tags: Default::default(),
120
- }
108
+ html_to_markdown_rs::metadata::DocumentMetadata::default().into()
121
109
  }
122
110
  }
123
111
 
@@ -634,13 +622,7 @@ unsafe impl TryConvertOwned for HtmlMetadata {}
634
622
 
635
623
  impl Default for HtmlMetadata {
636
624
  fn default() -> Self {
637
- Self {
638
- document: Default::default(),
639
- headers: vec![],
640
- links: vec![],
641
- images: vec![],
642
- structured_data: vec![],
643
- }
625
+ html_to_markdown_rs::metadata::HtmlMetadata::default().into()
644
626
  }
645
627
  }
646
628
 
@@ -774,51 +756,7 @@ unsafe impl TryConvertOwned for ConversionOptions {}
774
756
 
775
757
  impl Default for ConversionOptions {
776
758
  fn default() -> Self {
777
- Self {
778
- heading_style: Default::default(),
779
- list_indent_type: Default::default(),
780
- list_indent_width: 2,
781
- bullets: "-*+".to_string(),
782
- strong_em_symbol: "*".to_string(),
783
- escape_asterisks: false,
784
- escape_underscores: false,
785
- escape_misc: false,
786
- escape_ascii: false,
787
- code_language: "".to_string(),
788
- autolinks: true,
789
- default_title: false,
790
- br_in_tables: false,
791
- compact_tables: false,
792
- highlight_style: Default::default(),
793
- extract_metadata: true,
794
- whitespace_mode: Default::default(),
795
- strip_newlines: false,
796
- wrap: false,
797
- wrap_width: 80,
798
- convert_as_inline: false,
799
- sub_symbol: "".to_string(),
800
- sup_symbol: "".to_string(),
801
- newline_style: NewlineStyle::Spaces,
802
- code_block_style: Default::default(),
803
- keep_inline_images_in: vec![],
804
- preprocessing: Default::default(),
805
- encoding: "utf-8".to_string(),
806
- debug: false,
807
- strip_tags: vec![],
808
- preserve_tags: vec![],
809
- skip_images: false,
810
- url_escape_style: Default::default(),
811
- link_style: Default::default(),
812
- output_format: Default::default(),
813
- include_document_structure: false,
814
- extract_images: false,
815
- max_image_size: 5242880,
816
- capture_svg: false,
817
- infer_dimensions: true,
818
- max_depth: None,
819
- exclude_selectors: vec![],
820
- tier_strategy: TierStrategy::Auto,
821
- }
759
+ html_to_markdown_rs::options::ConversionOptions::default().into()
822
760
  }
823
761
  }
824
762
 
@@ -1255,51 +1193,7 @@ unsafe impl TryConvertOwned for ConversionOptionsUpdate {}
1255
1193
 
1256
1194
  impl Default for ConversionOptionsUpdate {
1257
1195
  fn default() -> Self {
1258
- Self {
1259
- heading_style: None,
1260
- list_indent_type: None,
1261
- list_indent_width: None,
1262
- bullets: None,
1263
- strong_em_symbol: None,
1264
- escape_asterisks: None,
1265
- escape_underscores: None,
1266
- escape_misc: None,
1267
- escape_ascii: None,
1268
- code_language: None,
1269
- autolinks: None,
1270
- default_title: None,
1271
- br_in_tables: None,
1272
- compact_tables: None,
1273
- highlight_style: None,
1274
- extract_metadata: None,
1275
- whitespace_mode: None,
1276
- strip_newlines: None,
1277
- wrap: None,
1278
- wrap_width: None,
1279
- convert_as_inline: None,
1280
- sub_symbol: None,
1281
- sup_symbol: None,
1282
- newline_style: None,
1283
- code_block_style: None,
1284
- keep_inline_images_in: None,
1285
- preprocessing: None,
1286
- encoding: None,
1287
- debug: None,
1288
- strip_tags: None,
1289
- preserve_tags: None,
1290
- skip_images: None,
1291
- url_escape_style: None,
1292
- link_style: None,
1293
- output_format: None,
1294
- include_document_structure: None,
1295
- extract_images: None,
1296
- max_image_size: None,
1297
- capture_svg: None,
1298
- infer_dimensions: None,
1299
- max_depth: None,
1300
- exclude_selectors: None,
1301
- tier_strategy: None,
1302
- }
1196
+ html_to_markdown_rs::options::ConversionOptionsUpdate::default().into()
1303
1197
  }
1304
1198
  }
1305
1199
 
@@ -1655,12 +1549,7 @@ unsafe impl TryConvertOwned for PreprocessingOptions {}
1655
1549
 
1656
1550
  impl Default for PreprocessingOptions {
1657
1551
  fn default() -> Self {
1658
- Self {
1659
- enabled: true,
1660
- preset: Default::default(),
1661
- remove_navigation: true,
1662
- remove_forms: true,
1663
- }
1552
+ html_to_markdown_rs::options::PreprocessingOptions::default().into()
1664
1553
  }
1665
1554
  }
1666
1555
 
@@ -1747,12 +1636,7 @@ unsafe impl TryConvertOwned for PreprocessingOptionsUpdate {}
1747
1636
 
1748
1637
  impl Default for PreprocessingOptionsUpdate {
1749
1638
  fn default() -> Self {
1750
- Self {
1751
- enabled: None,
1752
- preset: None,
1753
- remove_navigation: None,
1754
- remove_forms: None,
1755
- }
1639
+ html_to_markdown_rs::options::PreprocessingOptionsUpdate::default().into()
1756
1640
  }
1757
1641
  }
1758
1642
 
@@ -2211,13 +2095,7 @@ unsafe impl TryConvertOwned for ConversionResult {}
2211
2095
 
2212
2096
  impl Default for ConversionResult {
2213
2097
  fn default() -> Self {
2214
- Self {
2215
- content: None,
2216
- document: None,
2217
- metadata: Default::default(),
2218
- tables: vec![],
2219
- warnings: vec![],
2220
- }
2098
+ html_to_markdown_rs::ConversionResult::default().into()
2221
2099
  }
2222
2100
  }
2223
2101
 
@@ -2314,11 +2192,7 @@ unsafe impl TryConvertOwned for TableGrid {}
2314
2192
 
2315
2193
  impl Default for TableGrid {
2316
2194
  fn default() -> Self {
2317
- Self {
2318
- rows: 0,
2319
- cols: 0,
2320
- cells: vec![],
2321
- }
2195
+ html_to_markdown_rs::TableGrid::default().into()
2322
2196
  }
2323
2197
  }
2324
2198
 
@@ -6647,25 +6521,37 @@ impl From<html_to_markdown_rs::options::OutputFormat> for OutputFormat {
6647
6521
  impl From<NodeContent> for html_to_markdown_rs::NodeContent {
6648
6522
  fn from(val: NodeContent) -> Self {
6649
6523
  match val {
6650
- NodeContent::Heading { level, text } => Self::Heading { level, text },
6651
- NodeContent::Paragraph { text } => Self::Paragraph { text },
6652
- NodeContent::List { ordered } => Self::List { ordered },
6653
- NodeContent::ListItem { text } => Self::ListItem { text },
6524
+ NodeContent::Heading { level, text } => Self::Heading {
6525
+ level: level,
6526
+ text: text,
6527
+ },
6528
+ NodeContent::Paragraph { text } => Self::Paragraph { text: text },
6529
+ NodeContent::List { ordered } => Self::List { ordered: ordered },
6530
+ NodeContent::ListItem { text } => Self::ListItem { text: text },
6654
6531
  NodeContent::Table { grid } => Self::Table { grid: grid.into() },
6655
6532
  NodeContent::Image {
6656
6533
  description,
6657
6534
  src,
6658
6535
  image_index,
6659
6536
  } => Self::Image {
6660
- description,
6661
- src,
6662
- image_index,
6537
+ description: description,
6538
+ src: src,
6539
+ image_index: image_index,
6540
+ },
6541
+ NodeContent::Code { text, language } => Self::Code {
6542
+ text: text,
6543
+ language: language,
6663
6544
  },
6664
- NodeContent::Code { text, language } => Self::Code { text, language },
6665
6545
  NodeContent::Quote => Self::Quote,
6666
6546
  NodeContent::DefinitionList => Self::DefinitionList,
6667
- NodeContent::DefinitionItem { term, definition } => Self::DefinitionItem { term, definition },
6668
- NodeContent::RawBlock { format, content } => Self::RawBlock { format, content },
6547
+ NodeContent::DefinitionItem { term, definition } => Self::DefinitionItem {
6548
+ term: term,
6549
+ definition: definition,
6550
+ },
6551
+ NodeContent::RawBlock { format, content } => Self::RawBlock {
6552
+ format: format,
6553
+ content: content,
6554
+ },
6669
6555
  NodeContent::MetadataBlock { entries } => Self::MetadataBlock {
6670
6556
  entries: entries.into_iter().map(Into::into).collect(),
6671
6557
  },
@@ -6674,9 +6560,9 @@ impl From<NodeContent> for html_to_markdown_rs::NodeContent {
6674
6560
  heading_level,
6675
6561
  heading_text,
6676
6562
  } => Self::Group {
6677
- label,
6678
- heading_level,
6679
- heading_text,
6563
+ label: label,
6564
+ heading_level: heading_level,
6565
+ heading_text: heading_text,
6680
6566
  },
6681
6567
  }
6682
6568
  }
@@ -6686,11 +6572,11 @@ impl From<html_to_markdown_rs::NodeContent> for NodeContent {
6686
6572
  fn from(val: html_to_markdown_rs::NodeContent) -> Self {
6687
6573
  match val {
6688
6574
  html_to_markdown_rs::NodeContent::Heading { level, text } => Self::Heading {
6689
- level,
6575
+ level: level,
6690
6576
  text: text.to_string(),
6691
6577
  },
6692
6578
  html_to_markdown_rs::NodeContent::Paragraph { text } => Self::Paragraph { text: text.to_string() },
6693
- html_to_markdown_rs::NodeContent::List { ordered } => Self::List { ordered },
6579
+ html_to_markdown_rs::NodeContent::List { ordered } => Self::List { ordered: ordered },
6694
6580
  html_to_markdown_rs::NodeContent::ListItem { text } => Self::ListItem { text: text.to_string() },
6695
6581
  html_to_markdown_rs::NodeContent::Table { grid } => Self::Table { grid: grid.into() },
6696
6582
  html_to_markdown_rs::NodeContent::Image {
@@ -6700,7 +6586,7 @@ impl From<html_to_markdown_rs::NodeContent> for NodeContent {
6700
6586
  } => Self::Image {
6701
6587
  description: description.map(|v| v.to_string()),
6702
6588
  src: src.map(|v| v.to_string()),
6703
- image_index,
6589
+ image_index: image_index,
6704
6590
  },
6705
6591
  html_to_markdown_rs::NodeContent::Code { text, language } => Self::Code {
6706
6592
  text: text.to_string(),
@@ -6725,7 +6611,7 @@ impl From<html_to_markdown_rs::NodeContent> for NodeContent {
6725
6611
  heading_text,
6726
6612
  } => Self::Group {
6727
6613
  label: label.map(|v| v.to_string()),
6728
- heading_level,
6614
+ heading_level: heading_level,
6729
6615
  heading_text: heading_text.map(|v| v.to_string()),
6730
6616
  },
6731
6617
  }
@@ -6743,7 +6629,7 @@ impl From<AnnotationKind> for html_to_markdown_rs::AnnotationKind {
6743
6629
  AnnotationKind::Subscript => Self::Subscript,
6744
6630
  AnnotationKind::Superscript => Self::Superscript,
6745
6631
  AnnotationKind::Highlight => Self::Highlight,
6746
- AnnotationKind::Link { url, title } => Self::Link { url, title },
6632
+ AnnotationKind::Link { url, title } => Self::Link { url: url, title: title },
6747
6633
  }
6748
6634
  }
6749
6635
  }