html-to-markdown-wasm 2.9.0 → 2.9.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.
@@ -1,10 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Initialize panic hook for better error messages in the browser
5
- */
6
- export function init(): void;
7
- export function convertBytes(html: Uint8Array, options: any): string;
8
3
  /**
9
4
  * Convert HTML to Markdown
10
5
  *
@@ -26,9 +21,14 @@ export function convertBytes(html: Uint8Array, options: any): string;
26
21
  export function convert(html: string, options: any): string;
27
22
  export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
28
23
  export function convertBytesWithOptionsHandle(html: Uint8Array, handle: WasmConversionOptionsHandle): string;
29
- export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
30
24
  export function convertBytesWithInlineImages(html: Uint8Array, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
31
25
  export function createConversionOptionsHandle(options: any): WasmConversionOptionsHandle;
26
+ export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
27
+ export function convertBytes(html: Uint8Array, options: any): string;
28
+ /**
29
+ * Initialize panic hook for better error messages in the browser
30
+ */
31
+ export function init(): void;
32
32
  export class WasmConversionOptionsHandle {
33
33
  free(): void;
34
34
  [Symbol.dispose](): void;
@@ -231,43 +231,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
231
231
  }
232
232
  return result;
233
233
  }
234
- /**
235
- * Initialize panic hook for better error messages in the browser
236
- */
237
- export function init() {
238
- wasm.init();
239
- }
240
-
241
- /**
242
- * @param {Uint8Array} html
243
- * @param {any} options
244
- * @returns {string}
245
- */
246
- export function convertBytes(html, options) {
247
- let deferred2_0;
248
- let deferred2_1;
249
- try {
250
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
251
- wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
252
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
253
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
254
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
255
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
256
- var ptr1 = r0;
257
- var len1 = r1;
258
- if (r3) {
259
- ptr1 = 0; len1 = 0;
260
- throw takeObject(r2);
261
- }
262
- deferred2_0 = ptr1;
263
- deferred2_1 = len1;
264
- return getStringFromWasm0(ptr1, len1);
265
- } finally {
266
- wasm.__wbindgen_add_to_stack_pointer(16);
267
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
268
- }
269
- }
270
-
271
234
  /**
272
235
  * Convert HTML to Markdown
273
236
  *
@@ -381,6 +344,53 @@ export function convertBytesWithOptionsHandle(html, handle) {
381
344
  }
382
345
  }
383
346
 
347
+ /**
348
+ * @param {Uint8Array} html
349
+ * @param {any} options
350
+ * @param {WasmInlineImageConfig | null} [image_config]
351
+ * @returns {WasmHtmlExtraction}
352
+ */
353
+ export function convertBytesWithInlineImages(html, options, image_config) {
354
+ try {
355
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
356
+ let ptr0 = 0;
357
+ if (!isLikeNone(image_config)) {
358
+ _assertClass(image_config, WasmInlineImageConfig);
359
+ ptr0 = image_config.__destroy_into_raw();
360
+ }
361
+ wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
362
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
363
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
364
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
365
+ if (r2) {
366
+ throw takeObject(r1);
367
+ }
368
+ return WasmHtmlExtraction.__wrap(r0);
369
+ } finally {
370
+ wasm.__wbindgen_add_to_stack_pointer(16);
371
+ }
372
+ }
373
+
374
+ /**
375
+ * @param {any} options
376
+ * @returns {WasmConversionOptionsHandle}
377
+ */
378
+ export function createConversionOptionsHandle(options) {
379
+ try {
380
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
381
+ wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
382
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
383
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
384
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
385
+ if (r2) {
386
+ throw takeObject(r1);
387
+ }
388
+ return WasmConversionOptionsHandle.__wrap(r0);
389
+ } finally {
390
+ wasm.__wbindgen_add_to_stack_pointer(16);
391
+ }
392
+ }
393
+
384
394
  /**
385
395
  * @param {string} html
386
396
  * @param {WasmConversionOptionsHandle} handle
@@ -417,48 +427,38 @@ export function convertWithOptionsHandle(html, handle) {
417
427
  /**
418
428
  * @param {Uint8Array} html
419
429
  * @param {any} options
420
- * @param {WasmInlineImageConfig | null} [image_config]
421
- * @returns {WasmHtmlExtraction}
430
+ * @returns {string}
422
431
  */
423
- export function convertBytesWithInlineImages(html, options, image_config) {
432
+ export function convertBytes(html, options) {
433
+ let deferred2_0;
434
+ let deferred2_1;
424
435
  try {
425
436
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
426
- let ptr0 = 0;
427
- if (!isLikeNone(image_config)) {
428
- _assertClass(image_config, WasmInlineImageConfig);
429
- ptr0 = image_config.__destroy_into_raw();
430
- }
431
- wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
437
+ wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
432
438
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
433
439
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
434
440
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
435
- if (r2) {
436
- throw takeObject(r1);
441
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
442
+ var ptr1 = r0;
443
+ var len1 = r1;
444
+ if (r3) {
445
+ ptr1 = 0; len1 = 0;
446
+ throw takeObject(r2);
437
447
  }
438
- return WasmHtmlExtraction.__wrap(r0);
448
+ deferred2_0 = ptr1;
449
+ deferred2_1 = len1;
450
+ return getStringFromWasm0(ptr1, len1);
439
451
  } finally {
440
452
  wasm.__wbindgen_add_to_stack_pointer(16);
453
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
441
454
  }
442
455
  }
443
456
 
444
457
  /**
445
- * @param {any} options
446
- * @returns {WasmConversionOptionsHandle}
458
+ * Initialize panic hook for better error messages in the browser
447
459
  */
448
- export function createConversionOptionsHandle(options) {
449
- try {
450
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
451
- wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
452
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
453
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
454
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
455
- if (r2) {
456
- throw takeObject(r1);
457
- }
458
- return WasmConversionOptionsHandle.__wrap(r0);
459
- } finally {
460
- wasm.__wbindgen_add_to_stack_pointer(16);
461
- }
460
+ export function init() {
461
+ wasm.init();
462
462
  }
463
463
 
464
464
  const WasmConversionOptionsHandleFinalization = (typeof FinalizationRegistry === 'undefined')
Binary file
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.9.0",
7
+ "version": "2.9.1",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
@@ -1,10 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Initialize panic hook for better error messages in the browser
5
- */
6
- export function init(): void;
7
- export function convertBytes(html: Uint8Array, options: any): string;
8
3
  /**
9
4
  * Convert HTML to Markdown
10
5
  *
@@ -26,9 +21,14 @@ export function convertBytes(html: Uint8Array, options: any): string;
26
21
  export function convert(html: string, options: any): string;
27
22
  export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
28
23
  export function convertBytesWithOptionsHandle(html: Uint8Array, handle: WasmConversionOptionsHandle): string;
29
- export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
30
24
  export function convertBytesWithInlineImages(html: Uint8Array, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
31
25
  export function createConversionOptionsHandle(options: any): WasmConversionOptionsHandle;
26
+ export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
27
+ export function convertBytes(html: Uint8Array, options: any): string;
28
+ /**
29
+ * Initialize panic hook for better error messages in the browser
30
+ */
31
+ export function init(): void;
32
32
  export class WasmConversionOptionsHandle {
33
33
  free(): void;
34
34
  [Symbol.dispose](): void;
@@ -221,43 +221,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
221
221
  }
222
222
  return result;
223
223
  }
224
- /**
225
- * Initialize panic hook for better error messages in the browser
226
- */
227
- exports.init = function() {
228
- wasm.init();
229
- };
230
-
231
- /**
232
- * @param {Uint8Array} html
233
- * @param {any} options
234
- * @returns {string}
235
- */
236
- exports.convertBytes = function(html, options) {
237
- let deferred2_0;
238
- let deferred2_1;
239
- try {
240
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
241
- wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
242
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
243
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
244
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
245
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
246
- var ptr1 = r0;
247
- var len1 = r1;
248
- if (r3) {
249
- ptr1 = 0; len1 = 0;
250
- throw takeObject(r2);
251
- }
252
- deferred2_0 = ptr1;
253
- deferred2_1 = len1;
254
- return getStringFromWasm0(ptr1, len1);
255
- } finally {
256
- wasm.__wbindgen_add_to_stack_pointer(16);
257
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
258
- }
259
- };
260
-
261
224
  /**
262
225
  * Convert HTML to Markdown
263
226
  *
@@ -371,6 +334,53 @@ exports.convertBytesWithOptionsHandle = function(html, handle) {
371
334
  }
372
335
  };
373
336
 
337
+ /**
338
+ * @param {Uint8Array} html
339
+ * @param {any} options
340
+ * @param {WasmInlineImageConfig | null} [image_config]
341
+ * @returns {WasmHtmlExtraction}
342
+ */
343
+ exports.convertBytesWithInlineImages = function(html, options, image_config) {
344
+ try {
345
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
346
+ let ptr0 = 0;
347
+ if (!isLikeNone(image_config)) {
348
+ _assertClass(image_config, WasmInlineImageConfig);
349
+ ptr0 = image_config.__destroy_into_raw();
350
+ }
351
+ wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
352
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
353
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
354
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
355
+ if (r2) {
356
+ throw takeObject(r1);
357
+ }
358
+ return WasmHtmlExtraction.__wrap(r0);
359
+ } finally {
360
+ wasm.__wbindgen_add_to_stack_pointer(16);
361
+ }
362
+ };
363
+
364
+ /**
365
+ * @param {any} options
366
+ * @returns {WasmConversionOptionsHandle}
367
+ */
368
+ exports.createConversionOptionsHandle = function(options) {
369
+ try {
370
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
371
+ wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
372
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
373
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
374
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
375
+ if (r2) {
376
+ throw takeObject(r1);
377
+ }
378
+ return WasmConversionOptionsHandle.__wrap(r0);
379
+ } finally {
380
+ wasm.__wbindgen_add_to_stack_pointer(16);
381
+ }
382
+ };
383
+
374
384
  /**
375
385
  * @param {string} html
376
386
  * @param {WasmConversionOptionsHandle} handle
@@ -407,48 +417,38 @@ exports.convertWithOptionsHandle = function(html, handle) {
407
417
  /**
408
418
  * @param {Uint8Array} html
409
419
  * @param {any} options
410
- * @param {WasmInlineImageConfig | null} [image_config]
411
- * @returns {WasmHtmlExtraction}
420
+ * @returns {string}
412
421
  */
413
- exports.convertBytesWithInlineImages = function(html, options, image_config) {
422
+ exports.convertBytes = function(html, options) {
423
+ let deferred2_0;
424
+ let deferred2_1;
414
425
  try {
415
426
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
416
- let ptr0 = 0;
417
- if (!isLikeNone(image_config)) {
418
- _assertClass(image_config, WasmInlineImageConfig);
419
- ptr0 = image_config.__destroy_into_raw();
420
- }
421
- wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
427
+ wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
422
428
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
423
429
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
424
430
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
425
- if (r2) {
426
- throw takeObject(r1);
431
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
432
+ var ptr1 = r0;
433
+ var len1 = r1;
434
+ if (r3) {
435
+ ptr1 = 0; len1 = 0;
436
+ throw takeObject(r2);
427
437
  }
428
- return WasmHtmlExtraction.__wrap(r0);
438
+ deferred2_0 = ptr1;
439
+ deferred2_1 = len1;
440
+ return getStringFromWasm0(ptr1, len1);
429
441
  } finally {
430
442
  wasm.__wbindgen_add_to_stack_pointer(16);
443
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
431
444
  }
432
445
  };
433
446
 
434
447
  /**
435
- * @param {any} options
436
- * @returns {WasmConversionOptionsHandle}
448
+ * Initialize panic hook for better error messages in the browser
437
449
  */
438
- exports.createConversionOptionsHandle = function(options) {
439
- try {
440
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
441
- wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
442
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
443
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
444
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
445
- if (r2) {
446
- throw takeObject(r1);
447
- }
448
- return WasmConversionOptionsHandle.__wrap(r0);
449
- } finally {
450
- wasm.__wbindgen_add_to_stack_pointer(16);
451
- }
450
+ exports.init = function() {
451
+ wasm.init();
452
452
  };
453
453
 
454
454
  const WasmConversionOptionsHandleFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
5
5
  ],
6
- "version": "2.9.0",
6
+ "version": "2.9.1",
7
7
  "license": "MIT",
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,10 +1,5 @@
1
1
  /* tslint:disable */
2
2
  /* eslint-disable */
3
- /**
4
- * Initialize panic hook for better error messages in the browser
5
- */
6
- export function init(): void;
7
- export function convertBytes(html: Uint8Array, options: any): string;
8
3
  /**
9
4
  * Convert HTML to Markdown
10
5
  *
@@ -26,9 +21,14 @@ export function convertBytes(html: Uint8Array, options: any): string;
26
21
  export function convert(html: string, options: any): string;
27
22
  export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
28
23
  export function convertBytesWithOptionsHandle(html: Uint8Array, handle: WasmConversionOptionsHandle): string;
29
- export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
30
24
  export function convertBytesWithInlineImages(html: Uint8Array, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
31
25
  export function createConversionOptionsHandle(options: any): WasmConversionOptionsHandle;
26
+ export function convertWithOptionsHandle(html: string, handle: WasmConversionOptionsHandle): string;
27
+ export function convertBytes(html: Uint8Array, options: any): string;
28
+ /**
29
+ * Initialize panic hook for better error messages in the browser
30
+ */
31
+ export function init(): void;
32
32
  export class WasmConversionOptionsHandle {
33
33
  free(): void;
34
34
  [Symbol.dispose](): void;
@@ -227,43 +227,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
227
227
  }
228
228
  return result;
229
229
  }
230
- /**
231
- * Initialize panic hook for better error messages in the browser
232
- */
233
- export function init() {
234
- wasm.init();
235
- }
236
-
237
- /**
238
- * @param {Uint8Array} html
239
- * @param {any} options
240
- * @returns {string}
241
- */
242
- export function convertBytes(html, options) {
243
- let deferred2_0;
244
- let deferred2_1;
245
- try {
246
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
247
- wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
248
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
249
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
250
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
251
- var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
252
- var ptr1 = r0;
253
- var len1 = r1;
254
- if (r3) {
255
- ptr1 = 0; len1 = 0;
256
- throw takeObject(r2);
257
- }
258
- deferred2_0 = ptr1;
259
- deferred2_1 = len1;
260
- return getStringFromWasm0(ptr1, len1);
261
- } finally {
262
- wasm.__wbindgen_add_to_stack_pointer(16);
263
- wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
264
- }
265
- }
266
-
267
230
  /**
268
231
  * Convert HTML to Markdown
269
232
  *
@@ -377,6 +340,53 @@ export function convertBytesWithOptionsHandle(html, handle) {
377
340
  }
378
341
  }
379
342
 
343
+ /**
344
+ * @param {Uint8Array} html
345
+ * @param {any} options
346
+ * @param {WasmInlineImageConfig | null} [image_config]
347
+ * @returns {WasmHtmlExtraction}
348
+ */
349
+ export function convertBytesWithInlineImages(html, options, image_config) {
350
+ try {
351
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
352
+ let ptr0 = 0;
353
+ if (!isLikeNone(image_config)) {
354
+ _assertClass(image_config, WasmInlineImageConfig);
355
+ ptr0 = image_config.__destroy_into_raw();
356
+ }
357
+ wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
358
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
359
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
360
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
361
+ if (r2) {
362
+ throw takeObject(r1);
363
+ }
364
+ return WasmHtmlExtraction.__wrap(r0);
365
+ } finally {
366
+ wasm.__wbindgen_add_to_stack_pointer(16);
367
+ }
368
+ }
369
+
370
+ /**
371
+ * @param {any} options
372
+ * @returns {WasmConversionOptionsHandle}
373
+ */
374
+ export function createConversionOptionsHandle(options) {
375
+ try {
376
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
377
+ wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
378
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
379
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
380
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
381
+ if (r2) {
382
+ throw takeObject(r1);
383
+ }
384
+ return WasmConversionOptionsHandle.__wrap(r0);
385
+ } finally {
386
+ wasm.__wbindgen_add_to_stack_pointer(16);
387
+ }
388
+ }
389
+
380
390
  /**
381
391
  * @param {string} html
382
392
  * @param {WasmConversionOptionsHandle} handle
@@ -413,48 +423,38 @@ export function convertWithOptionsHandle(html, handle) {
413
423
  /**
414
424
  * @param {Uint8Array} html
415
425
  * @param {any} options
416
- * @param {WasmInlineImageConfig | null} [image_config]
417
- * @returns {WasmHtmlExtraction}
426
+ * @returns {string}
418
427
  */
419
- export function convertBytesWithInlineImages(html, options, image_config) {
428
+ export function convertBytes(html, options) {
429
+ let deferred2_0;
430
+ let deferred2_1;
420
431
  try {
421
432
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
422
- let ptr0 = 0;
423
- if (!isLikeNone(image_config)) {
424
- _assertClass(image_config, WasmInlineImageConfig);
425
- ptr0 = image_config.__destroy_into_raw();
426
- }
427
- wasm.convertBytesWithInlineImages(retptr, addHeapObject(html), addHeapObject(options), ptr0);
433
+ wasm.convertBytes(retptr, addHeapObject(html), addHeapObject(options));
428
434
  var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
429
435
  var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
430
436
  var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
431
- if (r2) {
432
- throw takeObject(r1);
437
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
438
+ var ptr1 = r0;
439
+ var len1 = r1;
440
+ if (r3) {
441
+ ptr1 = 0; len1 = 0;
442
+ throw takeObject(r2);
433
443
  }
434
- return WasmHtmlExtraction.__wrap(r0);
444
+ deferred2_0 = ptr1;
445
+ deferred2_1 = len1;
446
+ return getStringFromWasm0(ptr1, len1);
435
447
  } finally {
436
448
  wasm.__wbindgen_add_to_stack_pointer(16);
449
+ wasm.__wbindgen_export4(deferred2_0, deferred2_1, 1);
437
450
  }
438
451
  }
439
452
 
440
453
  /**
441
- * @param {any} options
442
- * @returns {WasmConversionOptionsHandle}
454
+ * Initialize panic hook for better error messages in the browser
443
455
  */
444
- export function createConversionOptionsHandle(options) {
445
- try {
446
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
447
- wasm.createConversionOptionsHandle(retptr, addHeapObject(options));
448
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
449
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
450
- var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
451
- if (r2) {
452
- throw takeObject(r1);
453
- }
454
- return WasmConversionOptionsHandle.__wrap(r0);
455
- } finally {
456
- wasm.__wbindgen_add_to_stack_pointer(16);
457
- }
456
+ export function init() {
457
+ wasm.init();
458
458
  }
459
459
 
460
460
  const WasmConversionOptionsHandleFinalization = (typeof FinalizationRegistry === 'undefined')
@@ -4,7 +4,7 @@
4
4
  "collaborators": [
5
5
  "Na'aman Hirschfeld <nhirschfeld@gmail.com>"
6
6
  ],
7
- "version": "2.9.0",
7
+ "version": "2.9.1",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "html-to-markdown-wasm",
3
- "version": "2.9.0",
3
+ "version": "2.9.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",