@kreuzberg/html-to-markdown-wasm 2.25.1 → 2.26.1

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.
@@ -18,7 +18,7 @@
18
18
  <img src="https://img.shields.io/maven-central/v/dev.kreuzberg/html-to-markdown?label=Java&color=007ec6" alt="Java">
19
19
  </a>
20
20
  <a href="https://pkg.go.dev/github.com/kreuzberg-dev/html-to-markdown/packages/go/v2/htmltomarkdown">
21
- <img src="https://img.shields.io/badge/Go-v2.24.1-007ec6" alt="Go">
21
+ <img src="https://img.shields.io/badge/Go-v2.26.0-007ec6" alt="Go">
22
22
  </a>
23
23
  <a href="https://www.nuget.org/packages/KreuzbergDev.HtmlToMarkdown/">
24
24
  <img src="https://img.shields.io/nuget/v/KreuzbergDev.HtmlToMarkdown?label=C%23&color=007ec6" alt="C#">
@@ -32,16 +32,21 @@
32
32
  <a href="https://hex.pm/packages/html_to_markdown">
33
33
  <img src="https://img.shields.io/hexpm/v/html_to_markdown?label=Elixir&color=007ec6" alt="Elixir">
34
34
  </a>
35
-
36
- <!-- Project Info -->
35
+ <a href="https://kreuzberg-dev.r-universe.dev/htmltomarkdown">
36
+ <img src="https://img.shields.io/badge/R-htmltomarkdown-007ec6" alt="R">
37
+ </a>
38
+ <a href="https://github.com/kreuzberg-dev/html-to-markdown/releases">
39
+ <img src="https://img.shields.io/badge/C-FFI-007ec6" alt="C">
40
+ </a>
41
+ <a href="https://docs.html-to-markdown.kreuzberg.dev">
42
+ <img src="https://img.shields.io/badge/Docs-kreuzberg.dev-007ec6" alt="Documentation">
43
+ </a>
37
44
  <a href="https://github.com/kreuzberg-dev/html-to-markdown/blob/main/LICENSE">
38
45
  <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License">
39
46
  </a>
40
47
  </div>
41
48
 
42
-
43
- <img width="3384" height="573" alt="Linkedin- Banner" src="https://github.com/user-attachments/assets/478a83da-237b-446b-b3a8-e564c13e00a8" />
44
-
49
+ <img width="3384" height="573" alt="Banner" src="https://github.com/user-attachments/assets/478a83da-237b-446b-b3a8-e564c13e00a8" />
45
50
 
46
51
  <div align="center" style="margin-top: 20px;">
47
52
  <a href="https://discord.gg/pXxagNK2zN">
@@ -49,178 +54,49 @@
49
54
  </a>
50
55
  </div>
51
56
 
52
- High-performance HTML Markdown conversion powered by Rust. Shipping as a Rust crate, Python package, PHP extension, Ruby gem, Elixir Rustler NIF, Node.js bindings, WebAssembly, and standalone CLI with identical rendering behavior across all runtimes.
53
-
54
- ## Key Features
55
-
56
- - **Blazing Fast** – Rust-powered core delivers 10-80× faster conversion than pure Python alternatives (150–280 MB/s)
57
- - **Polyglot** – Native bindings for Rust, Python, TypeScript/Node.js, Ruby, PHP, Go, Java, C#, and Elixir
58
- - **Smart Conversion** – Handles complex documents including nested tables, code blocks, task lists, and hOCR OCR output
59
- - **Metadata Extraction** – Extract document metadata (title, description, headers, links, images, structured data) alongside conversion
60
- - **Visitor Pattern** – Custom callbacks for domain-specific dialects, content filtering, URL rewriting, accessibility validation
61
- - **Highly Configurable** – Control heading styles, code block fences, list formatting, whitespace handling, and HTML sanitization
62
- - **Tag Preservation** – Keep specific HTML tags unconverted when markdown isn't expressive enough
63
- - **Secure by Default** – Built-in HTML sanitization prevents malicious content
64
- - **Consistent Output** – Identical markdown rendering across all language bindings
65
-
66
- **[Try the Live Demo →](https://kreuzberg-dev.github.io/html-to-markdown/)**
67
-
68
- ## Installation
69
-
70
- Each language binding provides comprehensive documentation with installation instructions, examples, and best practices. Choose your platform to get started:
71
-
72
- **Scripting Languages:**
73
- - **[Python](./packages/python/README.md)** – PyPI package, metadata extraction, visitor pattern, CLI included
74
- - **[Ruby](./packages/ruby/README.md)** – RubyGems package, RBS type definitions, Steep checking
75
- - **[PHP](./packages/php/README.md)** – Composer package + PIE extension, PHP 8.4+, PHPStan level 9
76
- - **[Elixir](./packages/elixir/README.md)** – Hex package, Rustler NIF bindings, Elixir 1.19+
77
-
78
- **JavaScript/TypeScript:**
79
- - **[Node.js / TypeScript](./packages/typescript/README.md)** – Native NAPI-RS bindings for Node.js/Bun, fastest performance, WebAssembly for browsers/Deno
80
-
81
- **Compiled Languages:**
82
- - **[Go](./packages/go/v2/README.md)** – Go module with FFI bindings, automatic library download
83
- - **[Java](./packages/java/README.md)** – Maven Central, Panama Foreign Function & Memory API, Java 24+
84
- - **[C#](./packages/csharp/README.md)** – NuGet package, .NET 8.0+, P/Invoke FFI bindings
85
-
86
- **Native:**
87
- - **[Rust](./crates/html-to-markdown/README.md)** – Core library, flexible feature flags, zero-copy APIs
88
-
89
- **Command-Line:**
90
- - **[CLI](https://crates.io/crates/html-to-markdown-cli)** – Cross-platform binary via `cargo install html-to-markdown-cli` or Homebrew: `brew install kreuzberg-dev/tap/html-to-markdown`
91
-
92
- <details>
93
- <summary><strong>Metadata Extraction</strong></summary>
94
-
95
- Extract comprehensive metadata during conversion: title, description, headers, links, images, structured data (JSON-LD, Microdata, RDFa). Use cases: SEO extraction, table-of-contents generation, link validation, accessibility auditing, content migration.
96
-
97
- **[Metadata Extraction Guide →](./examples/metadata-extraction/)**
98
-
99
- </details>
100
-
101
- <details>
102
- <summary><strong>Visitor Pattern</strong></summary>
103
-
104
- Customize HTML→Markdown conversion with callbacks for specific elements. Intercept links, images, headings, lists, and more. Use cases: domain-specific Markdown dialects (Obsidian, Notion), content filtering, URL rewriting, accessibility validation, analytics.
105
-
106
- Supported in: Rust, Python (sync & async), TypeScript/Node.js (sync & async), Ruby, and PHP.
107
-
108
- **[Visitor Pattern Guide →](./examples/visitor-pattern/)**
109
-
110
- ### Visitor Support Matrix
57
+ High-performance HTML to Markdown conversion powered by Rust. Ships as native bindings for **Rust, Python, TypeScript/Node.js, Ruby, PHP, Go, Java, C#, Elixir, R, C (FFI), and WebAssembly** with identical rendering across all runtimes.
111
58
 
112
- | Binding | Visitor Support | Async Support | Best For |
113
- |---------|-----------------|---------------|----------|
114
- | **Rust** | ✅ Yes | ✅ Tokio | Core library, performance-critical code |
115
- | **Python** | ✅ Yes | ✅ asyncio | Server-side, bulk processing |
116
- | **TypeScript/Node.js** | ✅ Yes | ✅ Promise-based | Server-side Node.js/Bun, best performance |
117
- | **Ruby** | ✅ Yes | ❌ No | Server-side Ruby on Rails, Sinatra |
118
- | **PHP** | ✅ Yes | ❌ No | Server-side PHP, content management |
119
- | **Go** | ❌ No | — | Basic conversion only |
120
- | **Java** | ❌ No | — | Basic conversion only |
121
- | **C#** | ❌ No | — | Basic conversion only |
122
- | **Elixir** | ❌ No | — | Basic conversion only |
123
- | **WebAssembly** | ❌ No | — | Browser, Edge, Deno (FFI limitations) |
59
+ **[Documentation](https://docs.html-to-markdown.kreuzberg.dev)** | **[Live Demo](https://kreuzberg-dev.github.io/html-to-markdown/)** | **[API Reference](https://docs.html-to-markdown.kreuzberg.dev/reference/api-rust/)**
124
60
 
125
- For WASM users needing visitor functionality, see [WASM Visitor Alternatives](./crates/html-to-markdown-wasm/README.md#visitor-pattern-support) for recommended approaches.
61
+ ## Highlights
126
62
 
127
- </details>
63
+ - **150-280 MB/s** throughput (10-80x faster than pure Python alternatives)
64
+ - **12 language bindings** with consistent output across all runtimes
65
+ - **Metadata extraction** — title, headers, links, images, structured data (JSON-LD, Microdata, RDFa)
66
+ - **Visitor pattern** — custom callbacks for content filtering, URL rewriting, domain-specific dialects
67
+ - **Secure by default** — built-in HTML sanitization via ammonia
128
68
 
129
- <details>
130
- <summary><strong>Performance & Benchmarking</strong></summary>
69
+ ## Quick Start
131
70
 
132
- Rust-powered core delivers 150–280 MB/s throughput (10-80× faster than pure Python alternatives). Includes benchmarking tools, memory profiling, streaming strategies, and optimization tips.
71
+ ```bash
72
+ # Rust
73
+ cargo add html-to-markdown-rs
133
74
 
134
- **[Performance Guide →](./examples/performance/)**
75
+ # Python
76
+ pip install html-to-markdown
135
77
 
136
- </details>
78
+ # TypeScript / Node.js
79
+ npm install @kreuzberg/html-to-markdown-node
137
80
 
138
- <details>
139
- <summary><strong>Tag Preservation</strong></summary>
81
+ # Ruby
82
+ gem install html-to-markdown
140
83
 
141
- Keep specific HTML tags unconverted when Markdown isn't expressive enough. Useful for tables, SVG, custom elements, or when you need mixed HTML/Markdown output.
142
-
143
- See language-specific documentation for `preserveTags` configuration.
144
-
145
- </details>
146
-
147
- <details>
148
- <summary><strong>Skipping Images</strong></summary>
149
-
150
- Skip all images during conversion using the `skip_images` option. Useful for text-only extraction or when you want to filter out visual content.
151
-
152
- **Rust:**
153
- ```rust
154
- use html_to_markdown_rs::{convert, ConversionOptions};
155
-
156
- let options = ConversionOptions {
157
- skip_images: true,
158
- ..Default::default()
159
- };
160
-
161
- let html = r#"<p>Text with <img src="image.jpg" alt="pic"> image</p>"#;
162
- let markdown = convert(html, Some(options))?;
163
- // Output: "Text with image" (image tags are removed)
164
- ```
165
-
166
- **Python:**
167
- ```python
168
- from html_to_markdown import convert, ConversionOptions
169
-
170
- options = ConversionOptions(skip_images=True)
171
- markdown = convert(html, options)
172
- ```
173
-
174
- **TypeScript/Node.js:**
175
- ```typescript
176
- import { convert, ConversionOptions } from '@kreuzberg/html-to-markdown-node';
177
-
178
- const options: ConversionOptions = {
179
- skipImages: true,
180
- };
181
-
182
- const markdown = convert(html, options);
183
- ```
184
-
185
- **Ruby:**
186
- ```ruby
187
- require 'html_to_markdown'
188
-
189
- options = HtmlToMarkdown::ConversionOptions.new(skip_images: true)
190
- markdown = HtmlToMarkdown.convert(html, options)
191
- ```
192
-
193
- **PHP:**
194
- ```php
195
- use Goldziher\HtmlToMarkdown\HtmlToMarkdown;
196
- use Goldziher\HtmlToMarkdown\Options;
197
-
198
- $options = new Options(['skip_images' => true]);
199
- $markdown = HtmlToMarkdown::convert($html, $options);
84
+ # CLI
85
+ cargo install html-to-markdown-cli
86
+ # or
87
+ brew install kreuzberg-dev/tap/html-to-markdown
200
88
  ```
201
89
 
202
- This option is available across all language bindings. When enabled, all `<img>` tags and their associated markdown image syntax are removed from the output.
203
-
204
- </details>
90
+ See the **[Installation Guide](https://docs.html-to-markdown.kreuzberg.dev/getting-started/installation/)** for all languages including PHP, Go, Java, C#, Elixir, R, and WASM.
205
91
 
206
- <details>
207
- <summary><strong>Secure by Default</strong></summary>
92
+ ## Part of the Kreuzberg Ecosystem
208
93
 
209
- Built-in HTML sanitization prevents XSS attacks and malicious content. Powered by ammonia with safe defaults. Configurable via `sanitize` options.
210
-
211
- </details>
94
+ html-to-markdown is developed by [kreuzberg.dev](https://kreuzberg.dev) and powers the HTML conversion pipeline in [Kreuzberg](https://docs.kreuzberg.dev), a document intelligence library for extracting text from PDFs, images, and office documents.
212
95
 
213
96
  ## Contributing
214
97
 
215
- Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines on:
216
-
217
- - Setting up the development environment
218
- - Running tests locally (Rust 95%+ coverage, language bindings 80%+)
219
- - Submitting pull requests
220
- - Reporting issues
221
-
222
- All contributions must follow code quality standards enforced via pre-commit hooks (prek).
98
+ Contributions welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for setup instructions and guidelines.
223
99
 
224
100
  ## License
225
101
 
226
- MIT License see [LICENSE](LICENSE) for details. You can use html-to-markdown freely in both commercial and closed-source products with no obligations, no viral effects, and no licensing restrictions.
102
+ MIT License see [LICENSE](LICENSE) for details.
@@ -774,83 +774,83 @@ export function init() {
774
774
  function __wbg_get_imports() {
775
775
  const import0 = {
776
776
  __proto__: null,
777
- __wbg_Error_8c4e43fe74559d73: function(arg0, arg1) {
777
+ __wbg_Error_83742b46f01ce22d: function(arg0, arg1) {
778
778
  const ret = Error(getStringFromWasm0(arg0, arg1));
779
779
  return addHeapObject(ret);
780
780
  },
781
- __wbg_Number_04624de7d0e8332d: function(arg0) {
781
+ __wbg_Number_a5a435bd7bbec835: function(arg0) {
782
782
  const ret = Number(getObject(arg0));
783
783
  return ret;
784
784
  },
785
- __wbg_String_8f0eb39a4a4c2f66: function(arg0, arg1) {
785
+ __wbg_String_8564e559799eccda: function(arg0, arg1) {
786
786
  const ret = String(getObject(arg1));
787
787
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
788
788
  const len1 = WASM_VECTOR_LEN;
789
789
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
790
790
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
791
791
  },
792
- __wbg___wbindgen_bigint_get_as_i64_8fcf4ce7f1ca72a2: function(arg0, arg1) {
792
+ __wbg___wbindgen_bigint_get_as_i64_447a76b5c6ef7bda: function(arg0, arg1) {
793
793
  const v = getObject(arg1);
794
794
  const ret = typeof(v) === 'bigint' ? v : undefined;
795
795
  getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
796
796
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
797
797
  },
798
- __wbg___wbindgen_boolean_get_bbbb1c18aa2f5e25: function(arg0) {
798
+ __wbg___wbindgen_boolean_get_c0f3f60bac5a78d1: function(arg0) {
799
799
  const v = getObject(arg0);
800
800
  const ret = typeof(v) === 'boolean' ? v : undefined;
801
801
  return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
802
802
  },
803
- __wbg___wbindgen_debug_string_0bc8482c6e3508ae: function(arg0, arg1) {
803
+ __wbg___wbindgen_debug_string_5398f5bb970e0daa: function(arg0, arg1) {
804
804
  const ret = debugString(getObject(arg1));
805
805
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
806
806
  const len1 = WASM_VECTOR_LEN;
807
807
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
808
808
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
809
809
  },
810
- __wbg___wbindgen_in_47fa6863be6f2f25: function(arg0, arg1) {
810
+ __wbg___wbindgen_in_41dbb8413020e076: function(arg0, arg1) {
811
811
  const ret = getObject(arg0) in getObject(arg1);
812
812
  return ret;
813
813
  },
814
- __wbg___wbindgen_is_bigint_31b12575b56f32fc: function(arg0) {
814
+ __wbg___wbindgen_is_bigint_e2141d4f045b7eda: function(arg0) {
815
815
  const ret = typeof(getObject(arg0)) === 'bigint';
816
816
  return ret;
817
817
  },
818
- __wbg___wbindgen_is_function_0095a73b8b156f76: function(arg0) {
818
+ __wbg___wbindgen_is_function_3c846841762788c1: function(arg0) {
819
819
  const ret = typeof(getObject(arg0)) === 'function';
820
820
  return ret;
821
821
  },
822
- __wbg___wbindgen_is_null_ac34f5003991759a: function(arg0) {
822
+ __wbg___wbindgen_is_null_0b605fc6b167c56f: function(arg0) {
823
823
  const ret = getObject(arg0) === null;
824
824
  return ret;
825
825
  },
826
- __wbg___wbindgen_is_object_5ae8e5880f2c1fbd: function(arg0) {
826
+ __wbg___wbindgen_is_object_781bc9f159099513: function(arg0) {
827
827
  const val = getObject(arg0);
828
828
  const ret = typeof(val) === 'object' && val !== null;
829
829
  return ret;
830
830
  },
831
- __wbg___wbindgen_is_string_cd444516edc5b180: function(arg0) {
831
+ __wbg___wbindgen_is_string_7ef6b97b02428fae: function(arg0) {
832
832
  const ret = typeof(getObject(arg0)) === 'string';
833
833
  return ret;
834
834
  },
835
- __wbg___wbindgen_is_undefined_9e4d92534c42d778: function(arg0) {
835
+ __wbg___wbindgen_is_undefined_52709e72fb9f179c: function(arg0) {
836
836
  const ret = getObject(arg0) === undefined;
837
837
  return ret;
838
838
  },
839
- __wbg___wbindgen_jsval_eq_11888390b0186270: function(arg0, arg1) {
839
+ __wbg___wbindgen_jsval_eq_ee31bfad3e536463: function(arg0, arg1) {
840
840
  const ret = getObject(arg0) === getObject(arg1);
841
841
  return ret;
842
842
  },
843
- __wbg___wbindgen_jsval_loose_eq_9dd77d8cd6671811: function(arg0, arg1) {
843
+ __wbg___wbindgen_jsval_loose_eq_5bcc3bed3c69e72b: function(arg0, arg1) {
844
844
  const ret = getObject(arg0) == getObject(arg1);
845
845
  return ret;
846
846
  },
847
- __wbg___wbindgen_number_get_8ff4255516ccad3e: function(arg0, arg1) {
847
+ __wbg___wbindgen_number_get_34bb9d9dcfa21373: function(arg0, arg1) {
848
848
  const obj = getObject(arg1);
849
849
  const ret = typeof(obj) === 'number' ? obj : undefined;
850
850
  getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
851
851
  getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
852
852
  },
853
- __wbg___wbindgen_string_get_72fb696202c56729: function(arg0, arg1) {
853
+ __wbg___wbindgen_string_get_395e606bd0ee4427: function(arg0, arg1) {
854
854
  const obj = getObject(arg1);
855
855
  const ret = typeof(obj) === 'string' ? obj : undefined;
856
856
  var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
@@ -858,22 +858,22 @@ function __wbg_get_imports() {
858
858
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
859
859
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
860
860
  },
861
- __wbg___wbindgen_throw_be289d5034ed271b: function(arg0, arg1) {
861
+ __wbg___wbindgen_throw_6ddd609b62940d55: function(arg0, arg1) {
862
862
  throw new Error(getStringFromWasm0(arg0, arg1));
863
863
  },
864
- __wbg_call_389efe28435a9388: function() { return handleError(function (arg0, arg1) {
864
+ __wbg_call_e133b57c9155d22c: function() { return handleError(function (arg0, arg1) {
865
865
  const ret = getObject(arg0).call(getObject(arg1));
866
866
  return addHeapObject(ret);
867
867
  }, arguments); },
868
- __wbg_codePointAt_bf59dbf74d8db275: function(arg0, arg1) {
868
+ __wbg_codePointAt_3925396be3b2c733: function(arg0, arg1) {
869
869
  const ret = getObject(arg0).codePointAt(arg1 >>> 0);
870
870
  return addHeapObject(ret);
871
871
  },
872
- __wbg_done_57b39ecd9addfe81: function(arg0) {
872
+ __wbg_done_08ce71ee07e3bd17: function(arg0) {
873
873
  const ret = getObject(arg0).done;
874
874
  return ret;
875
875
  },
876
- __wbg_error_7534b8e9a36f1ab4: function(arg0, arg1) {
876
+ __wbg_error_a6fa202b58aa1cd3: function(arg0, arg1) {
877
877
  let deferred0_0;
878
878
  let deferred0_1;
879
879
  try {
@@ -884,19 +884,19 @@ function __wbg_get_imports() {
884
884
  wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
885
885
  }
886
886
  },
887
- __wbg_get_9b94d73e6221f75c: function(arg0, arg1) {
888
- const ret = getObject(arg0)[arg1 >>> 0];
889
- return addHeapObject(ret);
890
- },
891
- __wbg_get_b3ed3ad4be2bc8ac: function() { return handleError(function (arg0, arg1) {
887
+ __wbg_get_326e41e095fb2575: function() { return handleError(function (arg0, arg1) {
892
888
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
893
889
  return addHeapObject(ret);
894
890
  }, arguments); },
895
- __wbg_get_with_ref_key_1dc361bd10053bfe: function(arg0, arg1) {
891
+ __wbg_get_unchecked_329cfe50afab7352: function(arg0, arg1) {
892
+ const ret = getObject(arg0)[arg1 >>> 0];
893
+ return addHeapObject(ret);
894
+ },
895
+ __wbg_get_with_ref_key_6412cf3094599694: function(arg0, arg1) {
896
896
  const ret = getObject(arg0)[getObject(arg1)];
897
897
  return addHeapObject(ret);
898
898
  },
899
- __wbg_instanceof_ArrayBuffer_c367199e2fa2aa04: function(arg0) {
899
+ __wbg_instanceof_ArrayBuffer_101e2bf31071a9f6: function(arg0) {
900
900
  let result;
901
901
  try {
902
902
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -906,7 +906,7 @@ function __wbg_get_imports() {
906
906
  const ret = result;
907
907
  return ret;
908
908
  },
909
- __wbg_instanceof_Object_1c6af87502b733ed: function(arg0) {
909
+ __wbg_instanceof_Object_be1962063fcc0c9f: function(arg0) {
910
910
  let result;
911
911
  try {
912
912
  result = getObject(arg0) instanceof Object;
@@ -916,7 +916,7 @@ function __wbg_get_imports() {
916
916
  const ret = result;
917
917
  return ret;
918
918
  },
919
- __wbg_instanceof_Uint8Array_9b9075935c74707c: function(arg0) {
919
+ __wbg_instanceof_Uint8Array_740438561a5b956d: function(arg0) {
920
920
  let result;
921
921
  try {
922
922
  result = getObject(arg0) instanceof Uint8Array;
@@ -926,91 +926,91 @@ function __wbg_get_imports() {
926
926
  const ret = result;
927
927
  return ret;
928
928
  },
929
- __wbg_isArray_d314bb98fcf08331: function(arg0) {
929
+ __wbg_isArray_33b91feb269ff46e: function(arg0) {
930
930
  const ret = Array.isArray(getObject(arg0));
931
931
  return ret;
932
932
  },
933
- __wbg_isSafeInteger_bfbc7332a9768d2a: function(arg0) {
933
+ __wbg_isSafeInteger_ecd6a7f9c3e053cd: function(arg0) {
934
934
  const ret = Number.isSafeInteger(getObject(arg0));
935
935
  return ret;
936
936
  },
937
- __wbg_iterator_6ff6560ca1568e55: function() {
937
+ __wbg_iterator_d8f549ec8fb061b1: function() {
938
938
  const ret = Symbol.iterator;
939
939
  return addHeapObject(ret);
940
940
  },
941
- __wbg_keys_b50a709a76add04e: function(arg0) {
941
+ __wbg_keys_ab0d051a1c55236d: function(arg0) {
942
942
  const ret = Object.keys(getObject(arg0));
943
943
  return addHeapObject(ret);
944
944
  },
945
- __wbg_length_32ed9a279acd054c: function(arg0) {
945
+ __wbg_length_15d3fc853a68bbbc: function(arg0) {
946
946
  const ret = getObject(arg0).length;
947
947
  return ret;
948
948
  },
949
- __wbg_length_35a7bace40f36eac: function(arg0) {
949
+ __wbg_length_b3416cf66a5452c8: function(arg0) {
950
950
  const ret = getObject(arg0).length;
951
951
  return ret;
952
952
  },
953
- __wbg_length_68dc7c5cf1b6d349: function(arg0) {
953
+ __wbg_length_ea16607d7b61445b: function(arg0) {
954
954
  const ret = getObject(arg0).length;
955
955
  return ret;
956
956
  },
957
- __wbg_new_361308b2356cecd0: function() {
958
- const ret = new Object();
957
+ __wbg_new_227d7c05414eb861: function() {
958
+ const ret = new Error();
959
959
  return addHeapObject(ret);
960
960
  },
961
- __wbg_new_3eb36ae241fe6f44: function() {
962
- const ret = new Array();
961
+ __wbg_new_49d5571bd3f0c4d4: function() {
962
+ const ret = new Map();
963
963
  return addHeapObject(ret);
964
964
  },
965
- __wbg_new_8a6f238a6ece86ea: function() {
966
- const ret = new Error();
965
+ __wbg_new_5f486cdf45a04d78: function(arg0) {
966
+ const ret = new Uint8Array(getObject(arg0));
967
967
  return addHeapObject(ret);
968
968
  },
969
- __wbg_new_dca287b076112a51: function() {
970
- const ret = new Map();
969
+ __wbg_new_a70fbab9066b301f: function() {
970
+ const ret = new Array();
971
971
  return addHeapObject(ret);
972
972
  },
973
- __wbg_new_dd2b680c8bf6ae29: function(arg0) {
974
- const ret = new Uint8Array(getObject(arg0));
973
+ __wbg_new_ab79df5bd7c26067: function() {
974
+ const ret = new Object();
975
975
  return addHeapObject(ret);
976
976
  },
977
- __wbg_new_from_slice_a3d2629dc1826784: function(arg0, arg1) {
977
+ __wbg_new_from_slice_22da9388ac046e50: function(arg0, arg1) {
978
978
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
979
979
  return addHeapObject(ret);
980
980
  },
981
- __wbg_next_3482f54c49e8af19: function() { return handleError(function (arg0) {
981
+ __wbg_next_11b99ee6237339e3: function() { return handleError(function (arg0) {
982
982
  const ret = getObject(arg0).next();
983
983
  return addHeapObject(ret);
984
984
  }, arguments); },
985
- __wbg_next_418f80d8f5303233: function(arg0) {
985
+ __wbg_next_e01a967809d1aa68: function(arg0) {
986
986
  const ret = getObject(arg0).next;
987
987
  return addHeapObject(ret);
988
988
  },
989
- __wbg_prototypesetcall_bdcdcc5842e4d77d: function(arg0, arg1, arg2) {
989
+ __wbg_prototypesetcall_d62e5099504357e6: function(arg0, arg1, arg2) {
990
990
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
991
991
  },
992
- __wbg_set_1eb0999cf5d27fc8: function(arg0, arg1, arg2) {
993
- const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
994
- return addHeapObject(ret);
992
+ __wbg_set_282384002438957f: function(arg0, arg1, arg2) {
993
+ getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
995
994
  },
996
- __wbg_set_3f1d0b984ed272ed: function(arg0, arg1, arg2) {
995
+ __wbg_set_6be42768c690e380: function(arg0, arg1, arg2) {
997
996
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
998
997
  },
999
- __wbg_set_6cb8631f80447a67: function() { return handleError(function (arg0, arg1, arg2) {
998
+ __wbg_set_7eaa4f96924fd6b3: function() { return handleError(function (arg0, arg1, arg2) {
1000
999
  const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
1001
1000
  return ret;
1002
1001
  }, arguments); },
1003
- __wbg_set_f43e577aea94465b: function(arg0, arg1, arg2) {
1004
- getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
1002
+ __wbg_set_bf7251625df30a02: function(arg0, arg1, arg2) {
1003
+ const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
1004
+ return addHeapObject(ret);
1005
1005
  },
1006
- __wbg_stack_0ed75d68575b0f3c: function(arg0, arg1) {
1006
+ __wbg_stack_3b0d974bbf31e44f: function(arg0, arg1) {
1007
1007
  const ret = getObject(arg1).stack;
1008
1008
  const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
1009
1009
  const len1 = WASM_VECTOR_LEN;
1010
1010
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
1011
1011
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
1012
1012
  },
1013
- __wbg_value_0546255b415e96c1: function(arg0) {
1013
+ __wbg_value_21fc78aab0322612: function(arg0) {
1014
1014
  const ret = getObject(arg0).value;
1015
1015
  return addHeapObject(ret);
1016
1016
  },
@@ -1151,7 +1151,7 @@ function debugString(val) {
1151
1151
  }
1152
1152
 
1153
1153
  function dropObject(idx) {
1154
- if (idx < 132) return;
1154
+ if (idx < 1028) return;
1155
1155
  heap[idx] = heap_next;
1156
1156
  heap_next = idx;
1157
1157
  }
@@ -1215,7 +1215,7 @@ function handleError(f, args) {
1215
1215
  }
1216
1216
  }
1217
1217
 
1218
- let heap = new Array(128).fill(undefined);
1218
+ let heap = new Array(1024).fill(undefined);
1219
1219
  heap.push(undefined, null, true, false);
1220
1220
 
1221
1221
  let heap_next = heap.length;
@@ -5,7 +5,7 @@
5
5
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
6
6
  ],
7
7
  "description": "HTML to Markdown conversion for WebAssembly targets",
8
- "version": "2.25.1",
8
+ "version": "2.26.1",
9
9
  "license": "MIT",
10
10
  "repository": {
11
11
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kreuzberg/html-to-markdown-wasm",
3
- "version": "2.25.1",
3
+ "version": "2.26.1",
4
4
  "description": "High-performance HTML to Markdown converter - WebAssembly bindings",
5
5
  "main": "dist/html_to_markdown_wasm.js",
6
6
  "types": "dist/html_to_markdown_wasm.d.ts",