html-to-markdown 2.5.4-x64-mingw-ucrt → 2.5.6-x64-mingw-ucrt

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: da361c2ac11f48459d81a14e9cee9835446f6c266478681e97e15e71ac127aa2
4
- data.tar.gz: 0ee56e500636a509848621fb4c2b6b79a4601a9eba574efc08f1ecd55411d99d
3
+ metadata.gz: 293c15f7e98796fa4301c19f9e3cc6a358a23c8bfc65c7ede00d60d7e468ad8a
4
+ data.tar.gz: aa595c333f44ec81cd2b1d91516ca715448fba25150b8da38997e48c1c084ba2
5
5
  SHA512:
6
- metadata.gz: 8fa061147ec15ced693f634d770ad5b22f7768ac4c5cea77eb752662c1f56af64ecd06c4388d998d10d89cd1e3cc6fb38a082ac087bdaa9dadcc358eca84334b
7
- data.tar.gz: 33639d1afb5c4fd63f7121e479b9da9e6e816cb39ff33b529daa63d2412359b2ac34a7d40d70825ed4141748c93c6f2ce5a3a1d3282420aa8a442f5c05fb84b8
6
+ metadata.gz: 1363bd4c24fc888f430f4a3cc558ff131b8aa4508d565b7166ea250956133c61c3e8a2271d034ca92b1484fdf38553488c98b915b2bd27f813b35d5af3e57457
7
+ data.tar.gz: 2fd6415a2ab202fdaa61a7e439bfb6e3551d2b13ac4a670b9aedf6d1c76529f10d8a32c12b7ad92b3e0269e64cc585b5b35144216df2770017d571fe674dc777
data/README.md CHANGED
@@ -17,6 +17,13 @@ Blazing-fast HTML → Markdown conversion for Ruby, powered by the same Rust eng
17
17
  - 🧰 **Bundled CLI proxy**: Call the Rust CLI straight from Ruby or shell scripts.
18
18
  - 🛠️ **First-class Rails support**: Works with `Gem.win_platform?` builds, supports Trusted Publishing, and compiles on install if no native gem matches.
19
19
 
20
+ ## Documentation & Support
21
+
22
+ - [GitHub repository](https://github.com/Goldziher/html-to-markdown)
23
+ - [Issue tracker](https://github.com/Goldziher/html-to-markdown/issues)
24
+ - [Changelog](https://github.com/Goldziher/html-to-markdown/blob/main/CHANGELOG.md)
25
+ - [Live demo (WASM)](https://goldziher.github.io/html-to-markdown/)
26
+
20
27
  ## Installation
21
28
 
22
29
  ```bash
@@ -156,7 +163,7 @@ You can also call the CLI binary directly for scripting:
156
163
 
157
164
  ```ruby
158
165
  HtmlToMarkdown::CLIProxy.call(['--version'])
159
- # => "html-to-markdown 2.5.4"
166
+ # => "html-to-markdown 2.5.6"
160
167
  ```
161
168
 
162
169
  Rebuild the CLI locally if you see `CLI binary not built` during tests:
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HtmlToMarkdown
4
- VERSION = '2.5.4'
4
+ VERSION = '2.5.6'
5
5
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-to-markdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.4
4
+ version: 2.5.6
5
5
  platform: x64-mingw-ucrt
6
6
  authors:
7
7
  - Na'aman Hirschfeld
@@ -10,15 +10,89 @@ bindir: exe
10
10
  cert_chain: []
11
11
  date: 2025-10-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: |-
14
- html-to-markdown wraps our ultra-fast Rust converter with a Ruby-native API via Magnus and rb-sys.
15
- Enjoy identical output to the Python, Node, and WASM bindings, a bundled CLI proxy, and seamless cross-platform installs.
13
+ description: "# html-to-markdown-rb\n\nBlazing-fast HTML → Markdown conversion for
14
+ Ruby, powered by the same Rust engine used by our Python, Node.js, and WebAssembly
15
+ packages. Ship identical Markdown across every runtime while enjoying native extension
16
+ performance.\n\n[![Crates.io](https://img.shields.io/crates/v/html-to-markdown-rs.svg)](https://crates.io/crates/html-to-markdown-rs)\n[![npm
17
+ version](https://badge.fury.io/js/html-to-markdown-node.svg)](https://www.npmjs.com/package/html-to-markdown-node)\n[![PyPI
18
+ version](https://badge.fury.io/py/html-to-markdown.svg)](https://pypi.org/project/html-to-markdown/)\n[![Gem
19
+ Version](https://badge.fury.io/rb/html-to-markdown.svg)](https://rubygems.org/gems/html-to-markdown)\n[![License:
20
+ MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/Goldziher/html-to-markdown/blob/main/LICENSE)\n\n##
21
+ Features\n\n- ⚡ **Rust-fast**: Ruby bindings around a highly optimised Rust core
22
+ (60‑80× faster than BeautifulSoup-based converters).\n- \U0001F501 **Identical output**:
23
+ Shares logic with the Python wheels, npm bindings, WASM package, and CLI — consistent
24
+ Markdown everywhere.\n- ⚙️ **Rich configuration**: Control heading styles, list
25
+ indentation, whitespace handling, HTML preprocessing, and more.\n- \U0001F5BC️ **Inline
26
+ image extraction**: Pull out embedded images (PNG/JPEG/SVG/data URIs) alongside
27
+ Markdown.\n- \U0001F9F0 **Bundled CLI proxy**: Call the Rust CLI straight from Ruby
28
+ or shell scripts.\n- \U0001F6E0️ **First-class Rails support**: Works with `Gem.win_platform?`
29
+ builds, supports Trusted Publishing, and compiles on install if no native gem matches.\n\n##
30
+ Documentation & Support\n\n- [GitHub repository](https://github.com/Goldziher/html-to-markdown)\n-
31
+ [Issue tracker](https://github.com/Goldziher/html-to-markdown/issues)\n- [Changelog](https://github.com/Goldziher/html-to-markdown/blob/main/CHANGELOG.md)\n-
32
+ [Live demo (WASM)](https://goldziher.github.io/html-to-markdown/)\n\n## Installation\n\n```bash\nbundle
33
+ add html-to-markdown\n# or\ngem install html-to-markdown\n```\n\nAdd the gem to
34
+ your project and Bundler will compile the native Rust extension on first install.\n\n###
35
+ Requirements\n\n- Ruby **3.2+** (Magnus relies on the fiber scheduler APIs added
36
+ in 3.2)\n- Rust toolchain **1.85+** with Cargo available on your `$PATH`\n- Ruby
37
+ development headers (`ruby-dev`, `ruby-devel`, or the platform equivalent)\n\n**Windows**:
38
+ install [RubyInstaller with MSYS2](https://rubyinstaller.org/) (UCRT64). Run once:\n\n```powershell\nridk
39
+ exec pacman -S --needed --noconfirm base-devel mingw-w64-ucrt-x86_64-toolchain\n```\n\nThis
40
+ provides the standard headers (including `strings.h`) required for the bindgen step.\n\n##
41
+ Performance Snapshot\n\nApple M4 • Real Wikipedia documents • `HtmlToMarkdown.convert`
42
+ (Ruby)\n\n| Document | Size | Latency | Throughput | Docs/sec |\n| -------------------
43
+ | ----- | ------- | ---------- | -------- |\n| Lists (Timeline) | 129KB | 0.69ms
44
+ \ | 187 MB/s | 1,450 |\n| Tables (Countries) | 360KB | 2.19ms | 164 MB/s
45
+ \ | 456 |\n| Mixed (Python wiki) | 656KB | 4.88ms | 134 MB/s | 205 |\n\n>
46
+ Same core, same benchmarks: the Ruby extension stays within single-digit % of the
47
+ Rust CLI and mirrors the Python/Node numbers.\n\n## Quick Start\n\n```ruby\nrequire
48
+ 'html_to_markdown'\n\nhtml = <<~HTML\n <h1>Welcome</h1>\n <p>This is <strong>Rust-fast</strong>
49
+ conversion!</p>\n <ul>\n <li>Native extension</li>\n <li>Identical output
50
+ across languages</li>\n </ul>\nHTML\n\nmarkdown = HtmlToMarkdown.convert(html)\nputs
51
+ markdown\n# # Welcome\n#\n# This is **Rust-fast** conversion!\n#\n# - Native extension\n#
52
+ - Identical output across languages\n```\n\n## API\n\n### Conversion Options\n\nPass
53
+ a Ruby hash (string or symbol keys) to tweak rendering. Every option maps one-for-one
54
+ with the Rust/Python/Node APIs.\n\n```ruby\nrequire 'html_to_markdown'\n\nmarkdown
55
+ = HtmlToMarkdown.convert(\n '<pre><code class=\"language-ruby\">puts \"hi\"</code></pre>',\n
56
+ \ heading_style: :atx,\n code_block_style: :fenced,\n bullets: '*+-',\n list_indent_type:
57
+ :spaces,\n list_indent_width: 2,\n whitespace_mode: :normalized,\n highlight_style:
58
+ :double_equal\n)\n\nputs markdown\n```\n\n### HTML Preprocessing\n\nClean up scraped
59
+ HTML (navigation, forms, malformed markup) before conversion:\n\n```ruby\nrequire
60
+ 'html_to_markdown'\n\nmarkdown = HtmlToMarkdown.convert(\n html,\n preprocessing:
61
+ {\n enabled: true,\n preset: :aggressive, # :minimal, :standard, :aggressive\n
62
+ \ remove_navigation: true,\n remove_forms: true\n }\n)\n```\n\n### Inline
63
+ Images\n\nExtract inline binary data (data URIs, SVG) together with the converted
64
+ Markdown.\n\n```ruby\nrequire 'html_to_markdown'\n\nresult = HtmlToMarkdown.convert_with_inline_images(\n
65
+ \ '<img src=\"data:image/png;base64,iVBORw0...\" alt=\"Pixel\">',\n image_config:
66
+ {\n max_decoded_size_bytes: 1 * 1024 * 1024,\n infer_dimensions: true,\n filename_prefix:
67
+ 'img_',\n capture_svg: true\n }\n)\n\nputs result.markdown\nresult.inline_images.each
68
+ do |img|\n puts \"#{img.filename} -> #{img.format} (#{img.data.bytesize} bytes)\"\nend\n```\n\n##
69
+ CLI\n\nThe gem bundles a small proxy for the Rust CLI binary. Use it when you need
70
+ parity with the standalone `html-to-markdown` executable.\n\n```ruby\nrequire 'html_to_markdown/cli'\n\nHtmlToMarkdown::CLI.run(%w[--heading-style
71
+ atx input.html], stdout: $stdout)\n# => writes converted Markdown to STDOUT\n```\n\nYou
72
+ can also call the CLI binary directly for scripting:\n\n```ruby\nHtmlToMarkdown::CLIProxy.call(['--version'])\n#
73
+ => \"html-to-markdown 2.5.6\"\n```\n\nRebuild the CLI locally if you see `CLI binary
74
+ not built` during tests:\n\n```bash\nbundle exec rake compile # builds
75
+ the extension\nbundle exec ruby scripts/prepare_ruby_gem.rb # copies the CLI into
76
+ lib/bin/\n```\n\n## Error Handling\n\nConversion errors raise `HtmlToMarkdown::Error`
77
+ (wrapping the Rust error context). CLI invocations use specialised subclasses:\n\n-
78
+ `HtmlToMarkdown::CLIProxy::MissingBinaryError`\n- `HtmlToMarkdown::CLIProxy::CLIExecutionError`\n\nRescue
79
+ them to provide clearer feedback in your application.\n\n## Consistent Across Languages\n\nThe
80
+ Ruby gem shares the exact Rust core with:\n\n- [Python wheels](https://pypi.org/project/html-to-markdown/)\n-
81
+ [Node.js / Bun bindings](https://www.npmjs.com/package/html-to-markdown-node)\n-
82
+ [WebAssembly package](https://www.npmjs.com/package/html-to-markdown-wasm)\n- The
83
+ Rust crate and CLI\n\nUse whichever runtime fits your stack while keeping formatting
84
+ behaviour identical.\n\n## Development\n\n```bash\nbundle exec rake compile #
85
+ build the native extension\nbundle exec rspec # run test suite\n```\n\nThe
86
+ extension uses [Magnus](https://github.com/matsadler/magnus) plus `rb-sys` for bindgen.
87
+ When editing the Rust code under `src/`, rerun `rake compile`.\n\n## License\n\nMIT
88
+ © Na'aman Hirschfeld\n"
16
89
  email:
17
90
  - nhirschfeld@gmail.com
18
91
  executables:
19
92
  - html-to-markdown
20
93
  extensions: []
21
- extra_rdoc_files: []
94
+ extra_rdoc_files:
95
+ - README.md
22
96
  files:
23
97
  - README.md
24
98
  - exe/html-to-markdown
@@ -40,7 +114,7 @@ metadata:
40
114
  source_code_uri: https://github.com/Goldziher/html-to-markdown
41
115
  bug_tracker_uri: https://github.com/Goldziher/html-to-markdown/issues
42
116
  changelog_uri: https://github.com/Goldziher/html-to-markdown/releases
43
- documentation_uri: https://github.com/Goldziher/html-to-markdown/blob/main/README.md
117
+ documentation_uri: https://github.com/Goldziher/html-to-markdown/blob/main/crates/html-to-markdown-rb/README.md
44
118
  post_install_message:
45
119
  rdoc_options: []
46
120
  require_paths: