html-to-markdown-wasm 2.5.0 → 2.5.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.
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Universal HTML to Markdown converter using WebAssembly.
4
4
 
5
+ Powered by the same Rust engine as the Node.js, Python, and Ruby bindings, so Markdown output stays identical regardless of runtime.
6
+
5
7
  Runs anywhere: Node.js, Deno, Bun, browsers, and edge runtimes.
6
8
 
7
9
  [![npm version](https://badge.fury.io/js/html-to-markdown-wasm.svg)](https://www.npmjs.com/package/html-to-markdown-wasm)
@@ -358,6 +360,15 @@ const markdown = convert(html, {
358
360
  console.log(markdown);
359
361
  ```
360
362
 
363
+ ## Other Runtimes
364
+
365
+ The same Rust engine ships as native bindings for other ecosystems:
366
+
367
+ - 🖥️ Node.js / Bun: [`html-to-markdown-node`](https://www.npmjs.com/package/html-to-markdown-node)
368
+ - 🐍 Python: [`html-to-markdown`](https://pypi.org/project/html-to-markdown/)
369
+ - 💎 Ruby: [`html-to-markdown`](https://rubygems.org/gems/html-to-markdown)
370
+ - 🦀 Rust crate & CLI: [`html-to-markdown-rs`](https://crates.io/crates/html-to-markdown-rs)
371
+
361
372
  ## Links
362
373
 
363
374
  - [GitHub Repository](https://github.com/Goldziher/html-to-markdown)
package/dist/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # html-to-markdown
2
2
 
3
- High-performance HTML → Markdown conversion powered by Rust. Shipping as a Rust crate, Python package, Node.js bindings, WebAssembly, and standalone CLI with identical rendering behaviour.
3
+ High-performance HTML → Markdown conversion powered by Rust. Shipping as a Rust crate, Python package, Ruby gem, Node.js bindings, WebAssembly, and standalone CLI with identical rendering behaviour.
4
4
 
5
5
  [![PyPI version](https://badge.fury.io/py/html-to-markdown.svg)](https://pypi.org/project/html-to-markdown/)
6
+ [![RubyGems](https://badge.fury.io/rb/html-to-markdown.svg)](https://rubygems.org/gems/html-to-markdown)
6
7
  [![npm version](https://badge.fury.io/js/html-to-markdown.svg)](https://www.npmjs.com/package/html-to-markdown-node)
7
8
  [![Crates.io](https://img.shields.io/crates/v/html-to-markdown-rs.svg)](https://crates.io/crates/html-to-markdown-rs)
8
9
  [![Python Versions](https://img.shields.io/pypi/pyversions/html-to-markdown.svg)](https://pypi.org/project/html-to-markdown/)
@@ -33,6 +34,7 @@ Experience WebAssembly-powered HTML to Markdown conversion instantly in your bro
33
34
  - Node.js/Bun (native) – [Node.js README](https://github.com/Goldziher/html-to-markdown/tree/main/crates/html-to-markdown-node)
34
35
  - WebAssembly (universal) – [WASM README](https://github.com/Goldziher/html-to-markdown/tree/main/crates/html-to-markdown-wasm)
35
36
  - **Python guide** – [Python README](https://github.com/Goldziher/html-to-markdown/blob/main/README_PYPI.md)
37
+ - **Ruby guide** – [Ruby README](https://github.com/Goldziher/html-to-markdown/tree/main/crates/html-to-markdown-rb)
36
38
  - **Rust guide** – [Rust README](https://github.com/Goldziher/html-to-markdown/tree/main/crates/html-to-markdown)
37
39
  - **Contributing** – [CONTRIBUTING.md](https://github.com/Goldziher/html-to-markdown/blob/main/CONTRIBUTING.md) ⭐ Start here!
38
40
  - **Changelog** – [CHANGELOG.md](https://github.com/Goldziher/html-to-markdown/blob/main/CHANGELOG.md)
@@ -45,6 +47,7 @@ Experience WebAssembly-powered HTML to Markdown conversion instantly in your bro
45
47
  | **WebAssembly** (universal) | `npm install html-to-markdown-wasm` |
46
48
  | **Deno** | `import { convert } from "npm:html-to-markdown-wasm"` |
47
49
  | **Python** (bindings + CLI) | `pip install html-to-markdown` |
50
+ | **Ruby** gem | `bundle add html-to-markdown` or `gem install html-to-markdown` |
48
51
  | **Rust** crate | `cargo add html-to-markdown-rs` |
49
52
  | Rust CLI | `cargo install html-to-markdown-cli` |
50
53
  | Homebrew CLI | `brew tap goldziher/tap`<br>`brew install html-to-markdown` |
@@ -176,3 +179,18 @@ Benchmarked on Apple M4 with complex real-world documents (Wikipedia articles, t
176
179
  - Chat with us on [Discord](https://discord.gg/pXxagNK2zN)
177
180
  - Explore the broader [Kreuzberg](https://kreuzberg.dev) document-processing ecosystem
178
181
  - Sponsor development via [GitHub Sponsors](https://github.com/sponsors/Goldziher)
182
+ ### Ruby
183
+
184
+ ```ruby
185
+ require 'html_to_markdown'
186
+
187
+ html = '<h1>Hello</h1><p>Rust ❤️ Markdown</p>'
188
+ markdown = HtmlToMarkdown.convert(html, heading_style: :atx, wrap: true)
189
+
190
+ puts markdown
191
+ # # Hello
192
+ #
193
+ # Rust ❤️ Markdown
194
+ ```
195
+
196
+ See the language-specific READMEs for complete configuration, hOCR workflows, and inline image extraction.
@@ -114,31 +114,6 @@ function getDataViewMemory0() {
114
114
  return cachedDataViewMemory0;
115
115
  }
116
116
 
117
- function handleError(f, args) {
118
- try {
119
- return f.apply(this, args);
120
- } catch (e) {
121
- wasm.__wbindgen_export_2(addHeapObject(e));
122
- }
123
- }
124
-
125
- function getArrayU8FromWasm0(ptr, len) {
126
- ptr = ptr >>> 0;
127
- return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
128
- }
129
-
130
- function dropObject(idx) {
131
- if (idx < 132) return;
132
- heap[idx] = heap_next;
133
- heap_next = idx;
134
- }
135
-
136
- function takeObject(idx) {
137
- const ret = getObject(idx);
138
- dropObject(idx);
139
- return ret;
140
- }
141
-
142
117
  function isLikeNone(x) {
143
118
  return x === undefined || x === null;
144
119
  }
@@ -208,6 +183,31 @@ function debugString(val) {
208
183
  return className;
209
184
  }
210
185
 
186
+ function handleError(f, args) {
187
+ try {
188
+ return f.apply(this, args);
189
+ } catch (e) {
190
+ wasm.__wbindgen_export3(addHeapObject(e));
191
+ }
192
+ }
193
+
194
+ function getArrayU8FromWasm0(ptr, len) {
195
+ ptr = ptr >>> 0;
196
+ return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);
197
+ }
198
+
199
+ function dropObject(idx) {
200
+ if (idx < 132) return;
201
+ heap[idx] = heap_next;
202
+ heap_next = idx;
203
+ }
204
+
205
+ function takeObject(idx) {
206
+ const ret = getObject(idx);
207
+ dropObject(idx);
208
+ return ret;
209
+ }
210
+
211
211
  let cachedUint32ArrayMemory0 = null;
212
212
 
213
213
  function getUint32ArrayMemory0() {
@@ -264,7 +264,7 @@ export function convert(html, options) {
264
264
  let deferred3_1;
265
265
  try {
266
266
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
267
- const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
267
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
268
268
  const len0 = WASM_VECTOR_LEN;
269
269
  wasm.convert(retptr, ptr0, len0, addHeapObject(options));
270
270
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
@@ -282,7 +282,7 @@ export function convert(html, options) {
282
282
  return getStringFromWasm0(ptr2, len2);
283
283
  } finally {
284
284
  wasm.__wbindgen_add_to_stack_pointer(16);
285
- wasm.__wbindgen_export_3(deferred3_0, deferred3_1, 1);
285
+ wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
286
286
  }
287
287
  }
288
288
 
@@ -321,7 +321,7 @@ function _assertClass(instance, klass) {
321
321
  export function convertWithInlineImages(html, options, image_config) {
322
322
  try {
323
323
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
324
- const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
324
+ const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
325
325
  const len0 = WASM_VECTOR_LEN;
326
326
  let ptr1 = 0;
327
327
  if (!isLikeNone(image_config)) {
@@ -384,7 +384,7 @@ export class WasmHtmlExtraction {
384
384
  return getStringFromWasm0(r0, r1);
385
385
  } finally {
386
386
  wasm.__wbindgen_add_to_stack_pointer(16);
387
- wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
387
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
388
388
  }
389
389
  }
390
390
  /**
@@ -397,7 +397,7 @@ export class WasmHtmlExtraction {
397
397
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
398
398
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
399
399
  var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
400
- wasm.__wbindgen_export_3(r0, r1 * 4, 4);
400
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
401
401
  return v1;
402
402
  } finally {
403
403
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -413,7 +413,7 @@ export class WasmHtmlExtraction {
413
413
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
414
414
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
415
415
  var v1 = getArrayJsValueFromWasm0(r0, r1).slice();
416
- wasm.__wbindgen_export_3(r0, r1 * 4, 4);
416
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
417
417
  return v1;
418
418
  } finally {
419
419
  wasm.__wbindgen_add_to_stack_pointer(16);
@@ -472,7 +472,7 @@ export class WasmInlineImage {
472
472
  return getStringFromWasm0(r0, r1);
473
473
  } finally {
474
474
  wasm.__wbindgen_add_to_stack_pointer(16);
475
- wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
475
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
476
476
  }
477
477
  }
478
478
  /**
@@ -487,7 +487,7 @@ export class WasmInlineImage {
487
487
  let v1;
488
488
  if (r0 !== 0) {
489
489
  v1 = getStringFromWasm0(r0, r1).slice();
490
- wasm.__wbindgen_export_3(r0, r1 * 1, 1);
490
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
491
491
  }
492
492
  return v1;
493
493
  } finally {
@@ -506,7 +506,7 @@ export class WasmInlineImage {
506
506
  let v1;
507
507
  if (r0 !== 0) {
508
508
  v1 = getStringFromWasm0(r0, r1).slice();
509
- wasm.__wbindgen_export_3(r0, r1 * 1, 1);
509
+ wasm.__wbindgen_export4(r0, r1 * 1, 1);
510
510
  }
511
511
  return v1;
512
512
  } finally {
@@ -525,7 +525,7 @@ export class WasmInlineImage {
525
525
  let v1;
526
526
  if (r0 !== 0) {
527
527
  v1 = getArrayU32FromWasm0(r0, r1).slice();
528
- wasm.__wbindgen_export_3(r0, r1 * 4, 4);
528
+ wasm.__wbindgen_export4(r0, r1 * 4, 4);
529
529
  }
530
530
  return v1;
531
531
  } finally {
@@ -548,7 +548,7 @@ export class WasmInlineImage {
548
548
  return getStringFromWasm0(r0, r1);
549
549
  } finally {
550
550
  wasm.__wbindgen_add_to_stack_pointer(16);
551
- wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
551
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
552
552
  }
553
553
  }
554
554
  /**
@@ -593,7 +593,7 @@ export class WasmInlineImageConfig {
593
593
  * @param {string | null} [prefix]
594
594
  */
595
595
  set filenamePrefix(prefix) {
596
- var ptr0 = isLikeNone(prefix) ? 0 : passStringToWasm0(prefix, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
596
+ var ptr0 = isLikeNone(prefix) ? 0 : passStringToWasm0(prefix, wasm.__wbindgen_export, wasm.__wbindgen_export2);
597
597
  var len0 = WASM_VECTOR_LEN;
598
598
  wasm.wasminlineimageconfig_set_filenamePrefix(this.__wbg_ptr, ptr0, len0);
599
599
  }
@@ -662,46 +662,133 @@ export class WasmInlineImageWarning {
662
662
  return getStringFromWasm0(r0, r1);
663
663
  } finally {
664
664
  wasm.__wbindgen_add_to_stack_pointer(16);
665
- wasm.__wbindgen_export_3(deferred1_0, deferred1_1, 1);
665
+ wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
666
666
  }
667
667
  }
668
668
  }
669
669
  if (Symbol.dispose) WasmInlineImageWarning.prototype[Symbol.dispose] = WasmInlineImageWarning.prototype.free;
670
670
 
671
- export function __wbg_Error_e17e777aac105295(arg0, arg1) {
671
+ export function __wbg_Error_e83987f665cf5504(arg0, arg1) {
672
672
  const ret = Error(getStringFromWasm0(arg0, arg1));
673
673
  return addHeapObject(ret);
674
674
  };
675
675
 
676
- export function __wbg_Number_998bea33bd87c3e0(arg0) {
676
+ export function __wbg_Number_bb48ca12f395cd08(arg0) {
677
677
  const ret = Number(getObject(arg0));
678
678
  return ret;
679
679
  };
680
680
 
681
681
  export function __wbg_String_8f0eb39a4a4c2f66(arg0, arg1) {
682
682
  const ret = String(getObject(arg1));
683
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
683
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
684
+ const len1 = WASM_VECTOR_LEN;
685
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
686
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
687
+ };
688
+
689
+ export function __wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd(arg0, arg1) {
690
+ const v = getObject(arg1);
691
+ const ret = typeof(v) === 'bigint' ? v : undefined;
692
+ getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
693
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
694
+ };
695
+
696
+ export function __wbg___wbindgen_boolean_get_6d5a1ee65bab5f68(arg0) {
697
+ const v = getObject(arg0);
698
+ const ret = typeof(v) === 'boolean' ? v : undefined;
699
+ return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
700
+ };
701
+
702
+ export function __wbg___wbindgen_debug_string_df47ffb5e35e6763(arg0, arg1) {
703
+ const ret = debugString(getObject(arg1));
704
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
684
705
  const len1 = WASM_VECTOR_LEN;
685
706
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
686
707
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
687
708
  };
688
709
 
689
- export function __wbg_call_13410aac570ffff7() { return handleError(function (arg0, arg1) {
710
+ export function __wbg___wbindgen_in_bb933bd9e1b3bc0f(arg0, arg1) {
711
+ const ret = getObject(arg0) in getObject(arg1);
712
+ return ret;
713
+ };
714
+
715
+ export function __wbg___wbindgen_is_bigint_cb320707dcd35f0b(arg0) {
716
+ const ret = typeof(getObject(arg0)) === 'bigint';
717
+ return ret;
718
+ };
719
+
720
+ export function __wbg___wbindgen_is_function_ee8a6c5833c90377(arg0) {
721
+ const ret = typeof(getObject(arg0)) === 'function';
722
+ return ret;
723
+ };
724
+
725
+ export function __wbg___wbindgen_is_null_5e69f72e906cc57c(arg0) {
726
+ const ret = getObject(arg0) === null;
727
+ return ret;
728
+ };
729
+
730
+ export function __wbg___wbindgen_is_object_c818261d21f283a4(arg0) {
731
+ const val = getObject(arg0);
732
+ const ret = typeof(val) === 'object' && val !== null;
733
+ return ret;
734
+ };
735
+
736
+ export function __wbg___wbindgen_is_string_fbb76cb2940daafd(arg0) {
737
+ const ret = typeof(getObject(arg0)) === 'string';
738
+ return ret;
739
+ };
740
+
741
+ export function __wbg___wbindgen_is_undefined_2d472862bd29a478(arg0) {
742
+ const ret = getObject(arg0) === undefined;
743
+ return ret;
744
+ };
745
+
746
+ export function __wbg___wbindgen_jsval_eq_6b13ab83478b1c50(arg0, arg1) {
747
+ const ret = getObject(arg0) === getObject(arg1);
748
+ return ret;
749
+ };
750
+
751
+ export function __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147(arg0, arg1) {
752
+ const ret = getObject(arg0) == getObject(arg1);
753
+ return ret;
754
+ };
755
+
756
+ export function __wbg___wbindgen_number_get_a20bf9b85341449d(arg0, arg1) {
757
+ const obj = getObject(arg1);
758
+ const ret = typeof(obj) === 'number' ? obj : undefined;
759
+ getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
760
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
761
+ };
762
+
763
+ export function __wbg___wbindgen_string_get_e4f06c90489ad01b(arg0, arg1) {
764
+ const obj = getObject(arg1);
765
+ const ret = typeof(obj) === 'string' ? obj : undefined;
766
+ var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
767
+ var len1 = WASM_VECTOR_LEN;
768
+ getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
769
+ getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
770
+ };
771
+
772
+ export function __wbg___wbindgen_throw_b855445ff6a94295(arg0, arg1) {
773
+ throw new Error(getStringFromWasm0(arg0, arg1));
774
+ };
775
+
776
+ export function __wbg_call_e762c39fa8ea36bf() { return handleError(function (arg0, arg1) {
690
777
  const ret = getObject(arg0).call(getObject(arg1));
691
778
  return addHeapObject(ret);
692
779
  }, arguments) };
693
780
 
694
- export function __wbg_codePointAt_6ee161d941249514(arg0, arg1) {
781
+ export function __wbg_codePointAt_01a186303396f7ad(arg0, arg1) {
695
782
  const ret = getObject(arg0).codePointAt(arg1 >>> 0);
696
783
  return addHeapObject(ret);
697
784
  };
698
785
 
699
- export function __wbg_done_75ed0ee6dd243d9d(arg0) {
786
+ export function __wbg_done_2042aa2670fb1db1(arg0) {
700
787
  const ret = getObject(arg0).done;
701
788
  return ret;
702
789
  };
703
790
 
704
- export function __wbg_entries_2be2f15bd5554996(arg0) {
791
+ export function __wbg_entries_e171b586f8f6bdbf(arg0) {
705
792
  const ret = Object.entries(getObject(arg0));
706
793
  return addHeapObject(ret);
707
794
  };
@@ -714,26 +801,26 @@ export function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
714
801
  deferred0_1 = arg1;
715
802
  console.error(getStringFromWasm0(arg0, arg1));
716
803
  } finally {
717
- wasm.__wbindgen_export_3(deferred0_0, deferred0_1, 1);
804
+ wasm.__wbindgen_export4(deferred0_0, deferred0_1, 1);
718
805
  }
719
806
  };
720
807
 
721
- export function __wbg_get_0da715ceaecea5c8(arg0, arg1) {
808
+ export function __wbg_get_7bed016f185add81(arg0, arg1) {
722
809
  const ret = getObject(arg0)[arg1 >>> 0];
723
810
  return addHeapObject(ret);
724
811
  };
725
812
 
726
- export function __wbg_get_458e874b43b18b25() { return handleError(function (arg0, arg1) {
813
+ export function __wbg_get_efcb449f58ec27c2() { return handleError(function (arg0, arg1) {
727
814
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
728
815
  return addHeapObject(ret);
729
816
  }, arguments) };
730
817
 
731
- export function __wbg_getwithrefkey_1dc361bd10053bfe(arg0, arg1) {
818
+ export function __wbg_get_with_ref_key_1dc361bd10053bfe(arg0, arg1) {
732
819
  const ret = getObject(arg0)[getObject(arg1)];
733
820
  return addHeapObject(ret);
734
821
  };
735
822
 
736
- export function __wbg_instanceof_ArrayBuffer_67f3012529f6a2dd(arg0) {
823
+ export function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
737
824
  let result;
738
825
  try {
739
826
  result = getObject(arg0) instanceof ArrayBuffer;
@@ -744,7 +831,7 @@ export function __wbg_instanceof_ArrayBuffer_67f3012529f6a2dd(arg0) {
744
831
  return ret;
745
832
  };
746
833
 
747
- export function __wbg_instanceof_Uint8Array_9a8378d955933db7(arg0) {
834
+ export function __wbg_instanceof_Uint8Array_20c8e73002f7af98(arg0) {
748
835
  let result;
749
836
  try {
750
837
  result = getObject(arg0) instanceof Uint8Array;
@@ -755,48 +842,48 @@ export function __wbg_instanceof_Uint8Array_9a8378d955933db7(arg0) {
755
842
  return ret;
756
843
  };
757
844
 
758
- export function __wbg_isArray_030cce220591fb41(arg0) {
845
+ export function __wbg_isArray_96e0af9891d0945d(arg0) {
759
846
  const ret = Array.isArray(getObject(arg0));
760
847
  return ret;
761
848
  };
762
849
 
763
- export function __wbg_isSafeInteger_1c0d1af5542e102a(arg0) {
850
+ export function __wbg_isSafeInteger_d216eda7911dde36(arg0) {
764
851
  const ret = Number.isSafeInteger(getObject(arg0));
765
852
  return ret;
766
853
  };
767
854
 
768
- export function __wbg_iterator_f370b34483c71a1c() {
855
+ export function __wbg_iterator_e5822695327a3c39() {
769
856
  const ret = Symbol.iterator;
770
857
  return addHeapObject(ret);
771
858
  };
772
859
 
773
- export function __wbg_length_186546c51cd61acd(arg0) {
860
+ export function __wbg_length_69bca3cb64fc8748(arg0) {
774
861
  const ret = getObject(arg0).length;
775
862
  return ret;
776
863
  };
777
864
 
778
- export function __wbg_length_6bb7e81f9d7713e4(arg0) {
865
+ export function __wbg_length_a95b69f903b746c4(arg0) {
779
866
  const ret = getObject(arg0).length;
780
867
  return ret;
781
868
  };
782
869
 
783
- export function __wbg_length_9d771c54845e987f(arg0) {
870
+ export function __wbg_length_cdd215e10d9dd507(arg0) {
784
871
  const ret = getObject(arg0).length;
785
872
  return ret;
786
873
  };
787
874
 
788
- export function __wbg_new_19c25a3f2fa63a02() {
875
+ export function __wbg_new_1acc0b6eea89d040() {
789
876
  const ret = new Object();
790
877
  return addHeapObject(ret);
791
878
  };
792
879
 
793
- export function __wbg_new_2ff1f68f3676ea53() {
794
- const ret = new Map();
880
+ export function __wbg_new_5a79be3ab53b8aa5(arg0) {
881
+ const ret = new Uint8Array(getObject(arg0));
795
882
  return addHeapObject(ret);
796
883
  };
797
884
 
798
- export function __wbg_new_638ebfaedbf32a5e(arg0) {
799
- const ret = new Uint8Array(getObject(arg0));
885
+ export function __wbg_new_68651c719dcda04e() {
886
+ const ret = new Map();
800
887
  return addHeapObject(ret);
801
888
  };
802
889
 
@@ -805,22 +892,22 @@ export function __wbg_new_8a6f238a6ece86ea() {
805
892
  return addHeapObject(ret);
806
893
  };
807
894
 
808
- export function __wbg_newfromslice_074c56947bd43469(arg0, arg1) {
895
+ export function __wbg_new_from_slice_92f4d78ca282a2d2(arg0, arg1) {
809
896
  const ret = new Uint8Array(getArrayU8FromWasm0(arg0, arg1));
810
897
  return addHeapObject(ret);
811
898
  };
812
899
 
813
- export function __wbg_next_5b3530e612fde77d(arg0) {
814
- const ret = getObject(arg0).next;
815
- return addHeapObject(ret);
816
- };
817
-
818
- export function __wbg_next_692e82279131b03c() { return handleError(function (arg0) {
900
+ export function __wbg_next_020810e0ae8ebcb0() { return handleError(function (arg0) {
819
901
  const ret = getObject(arg0).next();
820
902
  return addHeapObject(ret);
821
903
  }, arguments) };
822
904
 
823
- export function __wbg_prototypesetcall_3d4a26c1ed734349(arg0, arg1, arg2) {
905
+ export function __wbg_next_2c826fe5dfec6b6a(arg0) {
906
+ const ret = getObject(arg0).next;
907
+ return addHeapObject(ret);
908
+ };
909
+
910
+ export function __wbg_prototypesetcall_2a6620b6922694b2(arg0, arg1, arg2) {
824
911
  Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), getObject(arg2));
825
912
  };
826
913
 
@@ -828,20 +915,20 @@ export function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
828
915
  getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
829
916
  };
830
917
 
831
- export function __wbg_set_b7f1cf4fae26fe2a(arg0, arg1, arg2) {
918
+ export function __wbg_set_907fb406c34a251d(arg0, arg1, arg2) {
832
919
  const ret = getObject(arg0).set(getObject(arg1), getObject(arg2));
833
920
  return addHeapObject(ret);
834
921
  };
835
922
 
836
923
  export function __wbg_stack_0ed75d68575b0f3c(arg0, arg1) {
837
924
  const ret = getObject(arg1).stack;
838
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
925
+ const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export, wasm.__wbindgen_export2);
839
926
  const len1 = WASM_VECTOR_LEN;
840
927
  getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
841
928
  getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
842
929
  };
843
930
 
844
- export function __wbg_value_dd9372230531eade(arg0) {
931
+ export function __wbg_value_692627309814bb8c(arg0) {
845
932
  const ret = getObject(arg0).value;
846
933
  return addHeapObject(ret);
847
934
  };
@@ -856,93 +943,6 @@ export function __wbg_wasminlineimagewarning_new(arg0) {
856
943
  return addHeapObject(ret);
857
944
  };
858
945
 
859
- export function __wbg_wbindgenbigintgetasi64_ac743ece6ab9bba1(arg0, arg1) {
860
- const v = getObject(arg1);
861
- const ret = typeof(v) === 'bigint' ? v : undefined;
862
- getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);
863
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
864
- };
865
-
866
- export function __wbg_wbindgenbooleanget_3fe6f642c7d97746(arg0) {
867
- const v = getObject(arg0);
868
- const ret = typeof(v) === 'boolean' ? v : undefined;
869
- return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;
870
- };
871
-
872
- export function __wbg_wbindgendebugstring_99ef257a3ddda34d(arg0, arg1) {
873
- const ret = debugString(getObject(arg1));
874
- const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
875
- const len1 = WASM_VECTOR_LEN;
876
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
877
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
878
- };
879
-
880
- export function __wbg_wbindgenin_d7a1ee10933d2d55(arg0, arg1) {
881
- const ret = getObject(arg0) in getObject(arg1);
882
- return ret;
883
- };
884
-
885
- export function __wbg_wbindgenisbigint_ecb90cc08a5a9154(arg0) {
886
- const ret = typeof(getObject(arg0)) === 'bigint';
887
- return ret;
888
- };
889
-
890
- export function __wbg_wbindgenisfunction_8cee7dce3725ae74(arg0) {
891
- const ret = typeof(getObject(arg0)) === 'function';
892
- return ret;
893
- };
894
-
895
- export function __wbg_wbindgenisnull_f3037694abe4d97a(arg0) {
896
- const ret = getObject(arg0) === null;
897
- return ret;
898
- };
899
-
900
- export function __wbg_wbindgenisobject_307a53c6bd97fbf8(arg0) {
901
- const val = getObject(arg0);
902
- const ret = typeof(val) === 'object' && val !== null;
903
- return ret;
904
- };
905
-
906
- export function __wbg_wbindgenisstring_d4fa939789f003b0(arg0) {
907
- const ret = typeof(getObject(arg0)) === 'string';
908
- return ret;
909
- };
910
-
911
- export function __wbg_wbindgenisundefined_c4b71d073b92f3c5(arg0) {
912
- const ret = getObject(arg0) === undefined;
913
- return ret;
914
- };
915
-
916
- export function __wbg_wbindgenjsvaleq_e6f2ad59ccae1b58(arg0, arg1) {
917
- const ret = getObject(arg0) === getObject(arg1);
918
- return ret;
919
- };
920
-
921
- export function __wbg_wbindgenjsvallooseeq_9bec8c9be826bed1(arg0, arg1) {
922
- const ret = getObject(arg0) == getObject(arg1);
923
- return ret;
924
- };
925
-
926
- export function __wbg_wbindgennumberget_f74b4c7525ac05cb(arg0, arg1) {
927
- const obj = getObject(arg1);
928
- const ret = typeof(obj) === 'number' ? obj : undefined;
929
- getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);
930
- getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);
931
- };
932
-
933
- export function __wbg_wbindgenstringget_0f16a6ddddef376f(arg0, arg1) {
934
- const obj = getObject(arg1);
935
- const ret = typeof(obj) === 'string' ? obj : undefined;
936
- var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_export_0, wasm.__wbindgen_export_1);
937
- var len1 = WASM_VECTOR_LEN;
938
- getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);
939
- getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);
940
- };
941
-
942
- export function __wbg_wbindgenthrow_451ec1a8469d7eb6(arg0, arg1) {
943
- throw new Error(getStringFromWasm0(arg0, arg1));
944
- };
945
-
946
946
  export function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
947
947
  // Cast intrinsic for `Ref(String) -> Externref`.
948
948
  const ret = getStringFromWasm0(arg0, arg1);
Binary file
@@ -24,9 +24,9 @@ export const wasmhtmlextraction_warnings: (a: number, b: number) => void;
24
24
  export const convert: (a: number, b: number, c: number, d: number) => void;
25
25
  export const convertWithInlineImages: (a: number, b: number, c: number, d: number, e: number) => void;
26
26
  export const init: () => void;
27
- export const __wbindgen_export_0: (a: number, b: number) => number;
28
- export const __wbindgen_export_1: (a: number, b: number, c: number, d: number) => number;
29
- export const __wbindgen_export_2: (a: number) => void;
30
- export const __wbindgen_export_3: (a: number, b: number, c: number) => void;
27
+ export const __wbindgen_export: (a: number, b: number) => number;
28
+ export const __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
29
+ export const __wbindgen_export3: (a: number) => void;
30
+ export const __wbindgen_export4: (a: number, b: number, c: number) => void;
31
31
  export const __wbindgen_add_to_stack_pointer: (a: number) => number;
32
32
  export const __wbindgen_start: () => void;
package/dist/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "collaborators": [
5
5
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
6
6
  ],
7
- "version": "2.5.0",
7
+ "version": "2.5.1",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
package/package.json CHANGED
@@ -1,11 +1,14 @@
1
1
  {
2
2
  "name": "html-to-markdown-wasm",
3
- "version": "2.5.0",
3
+ "version": "2.5.1",
4
4
  "description": "High-performance HTML to Markdown converter - WebAssembly bindings",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "repository": "https://github.com/Goldziher/html-to-markdown",
8
+ "homepage": "https://github.com/Goldziher/html-to-markdown",
8
9
  "license": "MIT",
10
+ "author": "Na'aman Hirschfeld <nhirschfeld@gmail.com>",
11
+ "bugs": "https://github.com/Goldziher/html-to-markdown/issues",
9
12
  "keywords": [
10
13
  "html",
11
14
  "markdown",