html-to-markdown 3.8.1 → 3.8.3

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: d001dab2d306ee1cdc794224b24f05739fa0249fd978b401aa605596979f1d1f
4
- data.tar.gz: 944a3931d94eabeb9c97eeb6cdc376032d88019b01d89d3c4ba4ff53efb731e6
3
+ metadata.gz: d2e976c66a01c55fddf84ad733b5e93887614298101080abc65e138f171b6227
4
+ data.tar.gz: 53ed46b395b9c1a48d5f54d9377ed6ee2964b77619efd2e683688391130c3cc4
5
5
  SHA512:
6
- metadata.gz: 71aa0c8bf8f700bd91dd3fe9f0a4d4ad01e2cfcf88a78b544b7ffe4fc1bbd6194a2a639210d3b5a7244a3862460acb59417cd4909efab8b3bf183f1088d20d7b
7
- data.tar.gz: c85fdced163091bc61da0d7c89718570805d80afb1d545daaadaab7780d57a1d06fbb8e3312037716def7eada0ffde2b63c9378f6cbdb3466880e42c1d706d5e
6
+ metadata.gz: 7ddd0e474135f08b95260aee8f97e0312c50d599f353c4fa2b5a21b6d929306b533615df218e8db96bc7e24ddbb77067708c78a6662c320cd4271375aa26559a
7
+ data.tar.gz: 6d5412be2e8a0d6dab84064b7c9f0e7cfb7cacefd0e0a9314cf755d3e7d4e4a65d0a808f7cbc372750eaf37037551414e0d75d0eb3ce200255be81b93814ce80
data/README.md CHANGED
@@ -111,23 +111,11 @@ Requires Ruby 3.2+ with Magnus native extension bindings. Published for Linux, m
111
111
 
112
112
  Basic conversion:
113
113
 
114
- ```ruby
115
- require 'html_to_markdown'
116
-
117
- html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>"
118
- result = HtmlToMarkdown.convert(html)
119
- markdown = result[:content]
120
- ```
114
+ <!-- snippet not found: getting-started/basic_usage.md -->
121
115
 
122
116
  With conversion options:
123
117
 
124
- ```ruby
125
- require 'html_to_markdown'
126
-
127
- html = "<h1>Hello</h1><p>This is <strong>fast</strong>!</p>"
128
- result = HtmlToMarkdown.convert(html, heading_style: :atx, code_block_style: :fenced)
129
- markdown = result[:content]
130
- ```
118
+ <!-- snippet not found: getting-started/with_options.md -->
131
119
 
132
120
  ## Architecture
133
121
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  [package]
3
3
  name = "html-to-markdown-rb"
4
- version = "3.8.1"
4
+ version = "3.8.3"
5
5
  edition = "2024"
6
6
  license = "MIT"
7
7
  [workspace]
@@ -254,16 +254,13 @@ dependencies = [
254
254
 
255
255
  [[package]]
256
256
  name = "html-escape"
257
- version = "0.2.13"
257
+ version = "0.2.14"
258
258
  source = "registry+https://github.com/rust-lang/crates.io-index"
259
- checksum = "6d1ad449764d627e22bfd7cd5e8868264fc9236e07c752972b4080cd351cb476"
260
- dependencies = [
261
- "utf8-width",
262
- ]
259
+ checksum = "46c1ff2d1cbf39efe5af0900ced8a069b5e61557a17544eb0c4a50239937389e"
263
260
 
264
261
  [[package]]
265
262
  name = "html-to-markdown-rb"
266
- version = "3.8.1"
263
+ version = "3.8.3"
267
264
  dependencies = [
268
265
  "async-trait",
269
266
  "html-to-markdown-rs",
@@ -276,9 +273,9 @@ dependencies = [
276
273
 
277
274
  [[package]]
278
275
  name = "html-to-markdown-rs"
279
- version = "3.8.1"
276
+ version = "3.8.3"
280
277
  source = "registry+https://github.com/rust-lang/crates.io-index"
281
- checksum = "5b8defe72747832a90e54cd6b0daad64f89a970b9b3c977f40ba968d3f7f50c6"
278
+ checksum = "c5b47de513bfcc3312a7521bd52ca1a287b0f85614d839c23b9873ff5c1465b7"
282
279
  dependencies = [
283
280
  "ahash",
284
281
  "astral-tl",
@@ -432,9 +429,9 @@ dependencies = [
432
429
 
433
430
  [[package]]
434
431
  name = "memchr"
435
- version = "2.8.2"
432
+ version = "2.8.3"
436
433
  source = "registry+https://github.com/rust-lang/crates.io-index"
437
- checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4"
434
+ checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
438
435
 
439
436
  [[package]]
440
437
  name = "minimal-lexical"
@@ -694,9 +691,9 @@ dependencies = [
694
691
 
695
692
  [[package]]
696
693
  name = "regex"
697
- version = "1.12.4"
694
+ version = "1.13.0"
698
695
  source = "registry+https://github.com/rust-lang/crates.io-index"
699
- checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba"
696
+ checksum = "2a0e75113e14dc5acb068cd0786884f214f1312650a3d36d269f5c4f3cdee8a2"
700
697
  dependencies = [
701
698
  "aho-corasick",
702
699
  "memchr",
@@ -907,12 +904,6 @@ version = "0.7.6"
907
904
  source = "registry+https://github.com/rust-lang/crates.io-index"
908
905
  checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9"
909
906
 
910
- [[package]]
911
- name = "utf8-width"
912
- version = "0.1.8"
913
- source = "registry+https://github.com/rust-lang/crates.io-index"
914
- checksum = "1292c0d970b54115d14f2492fe0170adf21d68a1de108eebc51c1df4f346a091"
915
-
916
907
  [[package]]
917
908
  name = "version_check"
918
909
  version = "0.9.5"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "html-to-markdown-rb"
3
- version = "3.8.1"
3
+ version = "3.8.3"
4
4
  edition = "2024"
5
5
  license = "MIT"
6
6
  description = "High-performance HTML to Markdown converter"
@@ -9,7 +9,7 @@ keywords = ["converter", "html", "markdown"]
9
9
  categories = []
10
10
 
11
11
  [package.metadata.cargo-machete]
12
- ignored = ["rb-sys", "async-trait", "tokio"]
12
+ ignored = ["async-trait", "rb-sys", "tokio"]
13
13
 
14
14
  [lib]
15
15
  name = "html_to_markdown_rb"
@@ -25,7 +25,7 @@ visitor = ["html-to-markdown-rs/visitor"]
25
25
 
26
26
  [dependencies]
27
27
  async-trait = "0.1"
28
- html-to-markdown-rs = { version = "3.8.1", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
28
+ html-to-markdown-rs = { version = "3.8.3", features = ["serde", "metadata", "visitor", "inline-images", "testkit"] }
29
29
  magnus = "0.8"
30
30
  rb-sys = ">=0.9, <0.9.128"
31
31
  serde = { version = "1", features = ["derive"] }
@@ -1,5 +1,5 @@
1
1
  // This file is auto-generated by alef. DO NOT EDIT.
2
- // alef:hash:526c92c34b7201230da79912b4ec8eb9ecc5c6683951a43cd0234a619377accd
2
+ // alef:hash:22cbc7728e7527feef8e06cb67ad8290c07e3c276a312d04d887bbecdf8f6101
3
3
  // Re-generate with: alef generate
4
4
  #![allow(dead_code, unused_imports, unused_variables)]
5
5
  #![allow(
@@ -5590,6 +5590,7 @@ impl html_to_markdown_rs::visitor::HtmlVisitor for RbHtmlVisitorBridge {
5590
5590
  }
5591
5591
  }
5592
5592
 
5593
+ #[allow(clippy::needless_update)]
5593
5594
  #[allow(clippy::redundant_closure, clippy::useless_conversion)]
5594
5595
  impl From<DocumentMetadata> for html_to_markdown_rs::metadata::DocumentMetadata {
5595
5596
  fn from(val: DocumentMetadata) -> Self {
@@ -5609,6 +5610,7 @@ impl From<DocumentMetadata> for html_to_markdown_rs::metadata::DocumentMetadata
5609
5610
  .map(|(k, v)| (k.into(), v.into()))
5610
5611
  .collect(),
5611
5612
  meta_tags: val.meta_tags.into_iter().map(|(k, v)| (k.into(), v.into())).collect(),
5613
+ ..Default::default()
5612
5614
  }
5613
5615
  }
5614
5616
  }
@@ -5740,6 +5742,7 @@ impl From<html_to_markdown_rs::metadata::StructuredData> for StructuredData {
5740
5742
  }
5741
5743
  }
5742
5744
 
5745
+ #[allow(clippy::needless_update)]
5743
5746
  #[allow(clippy::redundant_closure, clippy::useless_conversion)]
5744
5747
  impl From<HtmlMetadata> for html_to_markdown_rs::metadata::HtmlMetadata {
5745
5748
  fn from(val: HtmlMetadata) -> Self {
@@ -5749,6 +5752,7 @@ impl From<HtmlMetadata> for html_to_markdown_rs::metadata::HtmlMetadata {
5749
5752
  links: val.links.into_iter().map(Into::into).collect(),
5750
5753
  images: val.images.into_iter().map(Into::into).collect(),
5751
5754
  structured_data: val.structured_data.into_iter().map(Into::into).collect(),
5755
+ ..Default::default()
5752
5756
  }
5753
5757
  }
5754
5758
  }
@@ -5921,6 +5925,7 @@ impl From<html_to_markdown_rs::options::ConversionOptionsUpdate> for ConversionO
5921
5925
  }
5922
5926
  }
5923
5927
 
5928
+ #[allow(clippy::needless_update)]
5924
5929
  #[allow(clippy::redundant_closure, clippy::useless_conversion)]
5925
5930
  impl From<PreprocessingOptions> for html_to_markdown_rs::options::PreprocessingOptions {
5926
5931
  fn from(val: PreprocessingOptions) -> Self {
@@ -5929,6 +5934,7 @@ impl From<PreprocessingOptions> for html_to_markdown_rs::options::PreprocessingO
5929
5934
  preset: val.preset.into(),
5930
5935
  remove_navigation: val.remove_navigation,
5931
5936
  remove_forms: val.remove_forms,
5937
+ ..Default::default()
5932
5938
  }
5933
5939
  }
5934
5940
  }
@@ -6099,6 +6105,7 @@ impl From<html_to_markdown_rs::ConversionResult> for ConversionResult {
6099
6105
  }
6100
6106
  }
6101
6107
 
6108
+ #[allow(clippy::needless_update)]
6102
6109
  #[allow(clippy::redundant_closure, clippy::useless_conversion)]
6103
6110
  impl From<TableGrid> for html_to_markdown_rs::TableGrid {
6104
6111
  fn from(val: TableGrid) -> Self {
@@ -6106,6 +6113,7 @@ impl From<TableGrid> for html_to_markdown_rs::TableGrid {
6106
6113
  rows: val.rows,
6107
6114
  cols: val.cols,
6108
6115
  cells: val.cells.into_iter().map(Into::into).collect(),
6116
+ ..Default::default()
6109
6117
  }
6110
6118
  }
6111
6119
  }
@@ -6521,25 +6529,37 @@ impl From<html_to_markdown_rs::options::OutputFormat> for OutputFormat {
6521
6529
  impl From<NodeContent> for html_to_markdown_rs::NodeContent {
6522
6530
  fn from(val: NodeContent) -> Self {
6523
6531
  match val {
6524
- NodeContent::Heading { level, text } => Self::Heading { level, text },
6525
- NodeContent::Paragraph { text } => Self::Paragraph { text },
6526
- NodeContent::List { ordered } => Self::List { ordered },
6527
- NodeContent::ListItem { text } => Self::ListItem { text },
6532
+ NodeContent::Heading { level, text } => Self::Heading {
6533
+ level: level,
6534
+ text: text,
6535
+ },
6536
+ NodeContent::Paragraph { text } => Self::Paragraph { text: text },
6537
+ NodeContent::List { ordered } => Self::List { ordered: ordered },
6538
+ NodeContent::ListItem { text } => Self::ListItem { text: text },
6528
6539
  NodeContent::Table { grid } => Self::Table { grid: grid.into() },
6529
6540
  NodeContent::Image {
6530
6541
  description,
6531
6542
  src,
6532
6543
  image_index,
6533
6544
  } => Self::Image {
6534
- description,
6535
- src,
6536
- image_index,
6545
+ description: description,
6546
+ src: src,
6547
+ image_index: image_index,
6548
+ },
6549
+ NodeContent::Code { text, language } => Self::Code {
6550
+ text: text,
6551
+ language: language,
6537
6552
  },
6538
- NodeContent::Code { text, language } => Self::Code { text, language },
6539
6553
  NodeContent::Quote => Self::Quote,
6540
6554
  NodeContent::DefinitionList => Self::DefinitionList,
6541
- NodeContent::DefinitionItem { term, definition } => Self::DefinitionItem { term, definition },
6542
- NodeContent::RawBlock { format, content } => Self::RawBlock { format, content },
6555
+ NodeContent::DefinitionItem { term, definition } => Self::DefinitionItem {
6556
+ term: term,
6557
+ definition: definition,
6558
+ },
6559
+ NodeContent::RawBlock { format, content } => Self::RawBlock {
6560
+ format: format,
6561
+ content: content,
6562
+ },
6543
6563
  NodeContent::MetadataBlock { entries } => Self::MetadataBlock {
6544
6564
  entries: entries.into_iter().map(Into::into).collect(),
6545
6565
  },
@@ -6548,9 +6568,9 @@ impl From<NodeContent> for html_to_markdown_rs::NodeContent {
6548
6568
  heading_level,
6549
6569
  heading_text,
6550
6570
  } => Self::Group {
6551
- label,
6552
- heading_level,
6553
- heading_text,
6571
+ label: label,
6572
+ heading_level: heading_level,
6573
+ heading_text: heading_text,
6554
6574
  },
6555
6575
  }
6556
6576
  }
@@ -6560,11 +6580,11 @@ impl From<html_to_markdown_rs::NodeContent> for NodeContent {
6560
6580
  fn from(val: html_to_markdown_rs::NodeContent) -> Self {
6561
6581
  match val {
6562
6582
  html_to_markdown_rs::NodeContent::Heading { level, text } => Self::Heading {
6563
- level,
6583
+ level: level,
6564
6584
  text: text.to_string(),
6565
6585
  },
6566
6586
  html_to_markdown_rs::NodeContent::Paragraph { text } => Self::Paragraph { text: text.to_string() },
6567
- html_to_markdown_rs::NodeContent::List { ordered } => Self::List { ordered },
6587
+ html_to_markdown_rs::NodeContent::List { ordered } => Self::List { ordered: ordered },
6568
6588
  html_to_markdown_rs::NodeContent::ListItem { text } => Self::ListItem { text: text.to_string() },
6569
6589
  html_to_markdown_rs::NodeContent::Table { grid } => Self::Table { grid: grid.into() },
6570
6590
  html_to_markdown_rs::NodeContent::Image {
@@ -6574,7 +6594,7 @@ impl From<html_to_markdown_rs::NodeContent> for NodeContent {
6574
6594
  } => Self::Image {
6575
6595
  description: description.map(|v| v.to_string()),
6576
6596
  src: src.map(|v| v.to_string()),
6577
- image_index,
6597
+ image_index: image_index,
6578
6598
  },
6579
6599
  html_to_markdown_rs::NodeContent::Code { text, language } => Self::Code {
6580
6600
  text: text.to_string(),
@@ -6599,7 +6619,7 @@ impl From<html_to_markdown_rs::NodeContent> for NodeContent {
6599
6619
  heading_text,
6600
6620
  } => Self::Group {
6601
6621
  label: label.map(|v| v.to_string()),
6602
- heading_level,
6622
+ heading_level: heading_level,
6603
6623
  heading_text: heading_text.map(|v| v.to_string()),
6604
6624
  },
6605
6625
  }
@@ -6617,7 +6637,7 @@ impl From<AnnotationKind> for html_to_markdown_rs::AnnotationKind {
6617
6637
  AnnotationKind::Subscript => Self::Subscript,
6618
6638
  AnnotationKind::Superscript => Self::Superscript,
6619
6639
  AnnotationKind::Highlight => Self::Highlight,
6620
- AnnotationKind::Link { url, title } => Self::Link { url, title },
6640
+ AnnotationKind::Link { url, title } => Self::Link { url: url, title: title },
6621
6641
  }
6622
6642
  }
6623
6643
  }
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:526c92c34b7201230da79912b4ec8eb9ecc5c6683951a43cd0234a619377accd
2
+ # alef:hash:22cbc7728e7527feef8e06cb67ad8290c07e3c276a312d04d887bbecdf8f6101
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
@@ -1,10 +1,10 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:526c92c34b7201230da79912b4ec8eb9ecc5c6683951a43cd0234a619377accd
2
+ # alef:hash:22cbc7728e7527feef8e06cb67ad8290c07e3c276a312d04d887bbecdf8f6101
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
6
6
 
7
7
  module HtmlToMarkdown
8
8
  ## The version string for this package.
9
- VERSION = "3.8.1"
9
+ VERSION = "3.8.3"
10
10
  end
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:526c92c34b7201230da79912b4ec8eb9ecc5c6683951a43cd0234a619377accd
2
+ # alef:hash:22cbc7728e7527feef8e06cb67ad8290c07e3c276a312d04d887bbecdf8f6101
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
  # frozen_string_literal: true
Binary file
data/sig/types.rbs CHANGED
@@ -1,5 +1,5 @@
1
1
  # This file is auto-generated by alef — DO NOT EDIT.
2
- # alef:hash:526c92c34b7201230da79912b4ec8eb9ecc5c6683951a43cd0234a619377accd
2
+ # alef:hash:22cbc7728e7527feef8e06cb67ad8290c07e3c276a312d04d887bbecdf8f6101
3
3
  # To regenerate: alef generate
4
4
  # To verify freshness: alef verify --exit-code
5
5
 
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.8.1
4
+ version: 3.8.3
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-07-02 00:00:00.000000000 Z
11
+ date: 2026-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rb_sys