html-to-markdown-wasm 2.6.2 → 2.6.4
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/dist/html_to_markdown_wasm.d.ts +19 -19
- package/dist/html_to_markdown_wasm_bg.js +47 -47
- package/dist/html_to_markdown_wasm_bg.wasm +0 -0
- package/dist/package.json +1 -1
- package/dist-node/html_to_markdown_wasm.d.ts +19 -19
- package/dist-node/html_to_markdown_wasm.js +47 -47
- package/dist-node/html_to_markdown_wasm_bg.wasm +0 -0
- package/dist-node/package.json +1 -1
- package/dist-web/html_to_markdown_wasm.d.ts +19 -19
- package/dist-web/html_to_markdown_wasm.js +47 -47
- package/dist-web/html_to_markdown_wasm_bg.wasm +0 -0
- package/dist-web/package.json +1 -1
- package/package.json +1 -1
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Convert HTML to Markdown
|
|
5
|
+
*
|
|
6
|
+
* # Arguments
|
|
7
|
+
*
|
|
8
|
+
* * `html` - The HTML string to convert
|
|
9
|
+
* * `options` - Optional conversion options (as a JavaScript object)
|
|
10
|
+
*
|
|
11
|
+
* # Example
|
|
12
|
+
*
|
|
13
|
+
* ```javascript
|
|
14
|
+
* import { convert } from '@html-to-markdown/wasm';
|
|
15
|
+
*
|
|
16
|
+
* const html = '<h1>Hello World</h1>';
|
|
17
|
+
* const markdown = convert(html);
|
|
18
|
+
* console.log(markdown); // # Hello World
|
|
19
|
+
* ```
|
|
5
20
|
*/
|
|
6
|
-
export function
|
|
21
|
+
export function convert(html: string, options: any): string;
|
|
7
22
|
/**
|
|
8
23
|
* Convert HTML to Markdown while collecting inline images
|
|
9
24
|
*
|
|
@@ -29,24 +44,9 @@ export function init(): void;
|
|
|
29
44
|
*/
|
|
30
45
|
export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
|
|
31
46
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* # Arguments
|
|
35
|
-
*
|
|
36
|
-
* * `html` - The HTML string to convert
|
|
37
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
38
|
-
*
|
|
39
|
-
* # Example
|
|
40
|
-
*
|
|
41
|
-
* ```javascript
|
|
42
|
-
* import { convert } from '@html-to-markdown/wasm';
|
|
43
|
-
*
|
|
44
|
-
* const html = '<h1>Hello World</h1>';
|
|
45
|
-
* const markdown = convert(html);
|
|
46
|
-
* console.log(markdown); // # Hello World
|
|
47
|
-
* ```
|
|
47
|
+
* Initialize panic hook for better error messages in the browser
|
|
48
48
|
*/
|
|
49
|
-
export function
|
|
49
|
+
export function init(): void;
|
|
50
50
|
/**
|
|
51
51
|
* Result of HTML extraction with inline images
|
|
52
52
|
*/
|
|
@@ -232,10 +232,51 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
232
232
|
return result;
|
|
233
233
|
}
|
|
234
234
|
/**
|
|
235
|
-
*
|
|
235
|
+
* Convert HTML to Markdown
|
|
236
|
+
*
|
|
237
|
+
* # Arguments
|
|
238
|
+
*
|
|
239
|
+
* * `html` - The HTML string to convert
|
|
240
|
+
* * `options` - Optional conversion options (as a JavaScript object)
|
|
241
|
+
*
|
|
242
|
+
* # Example
|
|
243
|
+
*
|
|
244
|
+
* ```javascript
|
|
245
|
+
* import { convert } from '@html-to-markdown/wasm';
|
|
246
|
+
*
|
|
247
|
+
* const html = '<h1>Hello World</h1>';
|
|
248
|
+
* const markdown = convert(html);
|
|
249
|
+
* console.log(markdown); // # Hello World
|
|
250
|
+
* ```
|
|
251
|
+
* @param {string} html
|
|
252
|
+
* @param {any} options
|
|
253
|
+
* @returns {string}
|
|
236
254
|
*/
|
|
237
|
-
export function
|
|
238
|
-
|
|
255
|
+
export function convert(html, options) {
|
|
256
|
+
let deferred3_0;
|
|
257
|
+
let deferred3_1;
|
|
258
|
+
try {
|
|
259
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
260
|
+
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
261
|
+
const len0 = WASM_VECTOR_LEN;
|
|
262
|
+
wasm.convert(retptr, ptr0, len0, addHeapObject(options));
|
|
263
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
264
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
265
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
266
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
267
|
+
var ptr2 = r0;
|
|
268
|
+
var len2 = r1;
|
|
269
|
+
if (r3) {
|
|
270
|
+
ptr2 = 0; len2 = 0;
|
|
271
|
+
throw takeObject(r2);
|
|
272
|
+
}
|
|
273
|
+
deferred3_0 = ptr2;
|
|
274
|
+
deferred3_1 = len2;
|
|
275
|
+
return getStringFromWasm0(ptr2, len2);
|
|
276
|
+
} finally {
|
|
277
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
278
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
279
|
+
}
|
|
239
280
|
}
|
|
240
281
|
|
|
241
282
|
function _assertClass(instance, klass) {
|
|
@@ -294,51 +335,10 @@ export function convertWithInlineImages(html, options, image_config) {
|
|
|
294
335
|
}
|
|
295
336
|
|
|
296
337
|
/**
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* # Arguments
|
|
300
|
-
*
|
|
301
|
-
* * `html` - The HTML string to convert
|
|
302
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
303
|
-
*
|
|
304
|
-
* # Example
|
|
305
|
-
*
|
|
306
|
-
* ```javascript
|
|
307
|
-
* import { convert } from '@html-to-markdown/wasm';
|
|
308
|
-
*
|
|
309
|
-
* const html = '<h1>Hello World</h1>';
|
|
310
|
-
* const markdown = convert(html);
|
|
311
|
-
* console.log(markdown); // # Hello World
|
|
312
|
-
* ```
|
|
313
|
-
* @param {string} html
|
|
314
|
-
* @param {any} options
|
|
315
|
-
* @returns {string}
|
|
338
|
+
* Initialize panic hook for better error messages in the browser
|
|
316
339
|
*/
|
|
317
|
-
export function
|
|
318
|
-
|
|
319
|
-
let deferred3_1;
|
|
320
|
-
try {
|
|
321
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
322
|
-
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
323
|
-
const len0 = WASM_VECTOR_LEN;
|
|
324
|
-
wasm.convert(retptr, ptr0, len0, addHeapObject(options));
|
|
325
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
326
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
327
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
328
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
329
|
-
var ptr2 = r0;
|
|
330
|
-
var len2 = r1;
|
|
331
|
-
if (r3) {
|
|
332
|
-
ptr2 = 0; len2 = 0;
|
|
333
|
-
throw takeObject(r2);
|
|
334
|
-
}
|
|
335
|
-
deferred3_0 = ptr2;
|
|
336
|
-
deferred3_1 = len2;
|
|
337
|
-
return getStringFromWasm0(ptr2, len2);
|
|
338
|
-
} finally {
|
|
339
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
340
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
341
|
-
}
|
|
340
|
+
export function init() {
|
|
341
|
+
wasm.init();
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
const WasmHtmlExtractionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
Binary file
|
package/dist/package.json
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Convert HTML to Markdown
|
|
5
|
+
*
|
|
6
|
+
* # Arguments
|
|
7
|
+
*
|
|
8
|
+
* * `html` - The HTML string to convert
|
|
9
|
+
* * `options` - Optional conversion options (as a JavaScript object)
|
|
10
|
+
*
|
|
11
|
+
* # Example
|
|
12
|
+
*
|
|
13
|
+
* ```javascript
|
|
14
|
+
* import { convert } from '@html-to-markdown/wasm';
|
|
15
|
+
*
|
|
16
|
+
* const html = '<h1>Hello World</h1>';
|
|
17
|
+
* const markdown = convert(html);
|
|
18
|
+
* console.log(markdown); // # Hello World
|
|
19
|
+
* ```
|
|
5
20
|
*/
|
|
6
|
-
export function
|
|
21
|
+
export function convert(html: string, options: any): string;
|
|
7
22
|
/**
|
|
8
23
|
* Convert HTML to Markdown while collecting inline images
|
|
9
24
|
*
|
|
@@ -29,24 +44,9 @@ export function init(): void;
|
|
|
29
44
|
*/
|
|
30
45
|
export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
|
|
31
46
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* # Arguments
|
|
35
|
-
*
|
|
36
|
-
* * `html` - The HTML string to convert
|
|
37
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
38
|
-
*
|
|
39
|
-
* # Example
|
|
40
|
-
*
|
|
41
|
-
* ```javascript
|
|
42
|
-
* import { convert } from '@html-to-markdown/wasm';
|
|
43
|
-
*
|
|
44
|
-
* const html = '<h1>Hello World</h1>';
|
|
45
|
-
* const markdown = convert(html);
|
|
46
|
-
* console.log(markdown); // # Hello World
|
|
47
|
-
* ```
|
|
47
|
+
* Initialize panic hook for better error messages in the browser
|
|
48
48
|
*/
|
|
49
|
-
export function
|
|
49
|
+
export function init(): void;
|
|
50
50
|
/**
|
|
51
51
|
* Result of HTML extraction with inline images
|
|
52
52
|
*/
|
|
@@ -222,10 +222,51 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
222
222
|
return result;
|
|
223
223
|
}
|
|
224
224
|
/**
|
|
225
|
-
*
|
|
225
|
+
* Convert HTML to Markdown
|
|
226
|
+
*
|
|
227
|
+
* # Arguments
|
|
228
|
+
*
|
|
229
|
+
* * `html` - The HTML string to convert
|
|
230
|
+
* * `options` - Optional conversion options (as a JavaScript object)
|
|
231
|
+
*
|
|
232
|
+
* # Example
|
|
233
|
+
*
|
|
234
|
+
* ```javascript
|
|
235
|
+
* import { convert } from '@html-to-markdown/wasm';
|
|
236
|
+
*
|
|
237
|
+
* const html = '<h1>Hello World</h1>';
|
|
238
|
+
* const markdown = convert(html);
|
|
239
|
+
* console.log(markdown); // # Hello World
|
|
240
|
+
* ```
|
|
241
|
+
* @param {string} html
|
|
242
|
+
* @param {any} options
|
|
243
|
+
* @returns {string}
|
|
226
244
|
*/
|
|
227
|
-
exports.
|
|
228
|
-
|
|
245
|
+
exports.convert = function(html, options) {
|
|
246
|
+
let deferred3_0;
|
|
247
|
+
let deferred3_1;
|
|
248
|
+
try {
|
|
249
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
250
|
+
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
251
|
+
const len0 = WASM_VECTOR_LEN;
|
|
252
|
+
wasm.convert(retptr, ptr0, len0, addHeapObject(options));
|
|
253
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
254
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
255
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
256
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
257
|
+
var ptr2 = r0;
|
|
258
|
+
var len2 = r1;
|
|
259
|
+
if (r3) {
|
|
260
|
+
ptr2 = 0; len2 = 0;
|
|
261
|
+
throw takeObject(r2);
|
|
262
|
+
}
|
|
263
|
+
deferred3_0 = ptr2;
|
|
264
|
+
deferred3_1 = len2;
|
|
265
|
+
return getStringFromWasm0(ptr2, len2);
|
|
266
|
+
} finally {
|
|
267
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
268
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
269
|
+
}
|
|
229
270
|
};
|
|
230
271
|
|
|
231
272
|
function _assertClass(instance, klass) {
|
|
@@ -284,51 +325,10 @@ exports.convertWithInlineImages = function(html, options, image_config) {
|
|
|
284
325
|
};
|
|
285
326
|
|
|
286
327
|
/**
|
|
287
|
-
*
|
|
288
|
-
*
|
|
289
|
-
* # Arguments
|
|
290
|
-
*
|
|
291
|
-
* * `html` - The HTML string to convert
|
|
292
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
293
|
-
*
|
|
294
|
-
* # Example
|
|
295
|
-
*
|
|
296
|
-
* ```javascript
|
|
297
|
-
* import { convert } from '@html-to-markdown/wasm';
|
|
298
|
-
*
|
|
299
|
-
* const html = '<h1>Hello World</h1>';
|
|
300
|
-
* const markdown = convert(html);
|
|
301
|
-
* console.log(markdown); // # Hello World
|
|
302
|
-
* ```
|
|
303
|
-
* @param {string} html
|
|
304
|
-
* @param {any} options
|
|
305
|
-
* @returns {string}
|
|
328
|
+
* Initialize panic hook for better error messages in the browser
|
|
306
329
|
*/
|
|
307
|
-
exports.
|
|
308
|
-
|
|
309
|
-
let deferred3_1;
|
|
310
|
-
try {
|
|
311
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
312
|
-
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
313
|
-
const len0 = WASM_VECTOR_LEN;
|
|
314
|
-
wasm.convert(retptr, ptr0, len0, addHeapObject(options));
|
|
315
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
316
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
317
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
318
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
319
|
-
var ptr2 = r0;
|
|
320
|
-
var len2 = r1;
|
|
321
|
-
if (r3) {
|
|
322
|
-
ptr2 = 0; len2 = 0;
|
|
323
|
-
throw takeObject(r2);
|
|
324
|
-
}
|
|
325
|
-
deferred3_0 = ptr2;
|
|
326
|
-
deferred3_1 = len2;
|
|
327
|
-
return getStringFromWasm0(ptr2, len2);
|
|
328
|
-
} finally {
|
|
329
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
330
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
331
|
-
}
|
|
330
|
+
exports.init = function() {
|
|
331
|
+
wasm.init();
|
|
332
332
|
};
|
|
333
333
|
|
|
334
334
|
const WasmHtmlExtractionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
Binary file
|
package/dist-node/package.json
CHANGED
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Convert HTML to Markdown
|
|
5
|
+
*
|
|
6
|
+
* # Arguments
|
|
7
|
+
*
|
|
8
|
+
* * `html` - The HTML string to convert
|
|
9
|
+
* * `options` - Optional conversion options (as a JavaScript object)
|
|
10
|
+
*
|
|
11
|
+
* # Example
|
|
12
|
+
*
|
|
13
|
+
* ```javascript
|
|
14
|
+
* import { convert } from '@html-to-markdown/wasm';
|
|
15
|
+
*
|
|
16
|
+
* const html = '<h1>Hello World</h1>';
|
|
17
|
+
* const markdown = convert(html);
|
|
18
|
+
* console.log(markdown); // # Hello World
|
|
19
|
+
* ```
|
|
5
20
|
*/
|
|
6
|
-
export function
|
|
21
|
+
export function convert(html: string, options: any): string;
|
|
7
22
|
/**
|
|
8
23
|
* Convert HTML to Markdown while collecting inline images
|
|
9
24
|
*
|
|
@@ -29,24 +44,9 @@ export function init(): void;
|
|
|
29
44
|
*/
|
|
30
45
|
export function convertWithInlineImages(html: string, options: any, image_config?: WasmInlineImageConfig | null): WasmHtmlExtraction;
|
|
31
46
|
/**
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* # Arguments
|
|
35
|
-
*
|
|
36
|
-
* * `html` - The HTML string to convert
|
|
37
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
38
|
-
*
|
|
39
|
-
* # Example
|
|
40
|
-
*
|
|
41
|
-
* ```javascript
|
|
42
|
-
* import { convert } from '@html-to-markdown/wasm';
|
|
43
|
-
*
|
|
44
|
-
* const html = '<h1>Hello World</h1>';
|
|
45
|
-
* const markdown = convert(html);
|
|
46
|
-
* console.log(markdown); // # Hello World
|
|
47
|
-
* ```
|
|
47
|
+
* Initialize panic hook for better error messages in the browser
|
|
48
48
|
*/
|
|
49
|
-
export function
|
|
49
|
+
export function init(): void;
|
|
50
50
|
/**
|
|
51
51
|
* Result of HTML extraction with inline images
|
|
52
52
|
*/
|
|
@@ -228,10 +228,51 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
228
228
|
return result;
|
|
229
229
|
}
|
|
230
230
|
/**
|
|
231
|
-
*
|
|
231
|
+
* Convert HTML to Markdown
|
|
232
|
+
*
|
|
233
|
+
* # Arguments
|
|
234
|
+
*
|
|
235
|
+
* * `html` - The HTML string to convert
|
|
236
|
+
* * `options` - Optional conversion options (as a JavaScript object)
|
|
237
|
+
*
|
|
238
|
+
* # Example
|
|
239
|
+
*
|
|
240
|
+
* ```javascript
|
|
241
|
+
* import { convert } from '@html-to-markdown/wasm';
|
|
242
|
+
*
|
|
243
|
+
* const html = '<h1>Hello World</h1>';
|
|
244
|
+
* const markdown = convert(html);
|
|
245
|
+
* console.log(markdown); // # Hello World
|
|
246
|
+
* ```
|
|
247
|
+
* @param {string} html
|
|
248
|
+
* @param {any} options
|
|
249
|
+
* @returns {string}
|
|
232
250
|
*/
|
|
233
|
-
export function
|
|
234
|
-
|
|
251
|
+
export function convert(html, options) {
|
|
252
|
+
let deferred3_0;
|
|
253
|
+
let deferred3_1;
|
|
254
|
+
try {
|
|
255
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
256
|
+
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
257
|
+
const len0 = WASM_VECTOR_LEN;
|
|
258
|
+
wasm.convert(retptr, ptr0, len0, addHeapObject(options));
|
|
259
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
260
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
261
|
+
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
262
|
+
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
263
|
+
var ptr2 = r0;
|
|
264
|
+
var len2 = r1;
|
|
265
|
+
if (r3) {
|
|
266
|
+
ptr2 = 0; len2 = 0;
|
|
267
|
+
throw takeObject(r2);
|
|
268
|
+
}
|
|
269
|
+
deferred3_0 = ptr2;
|
|
270
|
+
deferred3_1 = len2;
|
|
271
|
+
return getStringFromWasm0(ptr2, len2);
|
|
272
|
+
} finally {
|
|
273
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
274
|
+
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
275
|
+
}
|
|
235
276
|
}
|
|
236
277
|
|
|
237
278
|
function _assertClass(instance, klass) {
|
|
@@ -290,51 +331,10 @@ export function convertWithInlineImages(html, options, image_config) {
|
|
|
290
331
|
}
|
|
291
332
|
|
|
292
333
|
/**
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
* # Arguments
|
|
296
|
-
*
|
|
297
|
-
* * `html` - The HTML string to convert
|
|
298
|
-
* * `options` - Optional conversion options (as a JavaScript object)
|
|
299
|
-
*
|
|
300
|
-
* # Example
|
|
301
|
-
*
|
|
302
|
-
* ```javascript
|
|
303
|
-
* import { convert } from '@html-to-markdown/wasm';
|
|
304
|
-
*
|
|
305
|
-
* const html = '<h1>Hello World</h1>';
|
|
306
|
-
* const markdown = convert(html);
|
|
307
|
-
* console.log(markdown); // # Hello World
|
|
308
|
-
* ```
|
|
309
|
-
* @param {string} html
|
|
310
|
-
* @param {any} options
|
|
311
|
-
* @returns {string}
|
|
334
|
+
* Initialize panic hook for better error messages in the browser
|
|
312
335
|
*/
|
|
313
|
-
export function
|
|
314
|
-
|
|
315
|
-
let deferred3_1;
|
|
316
|
-
try {
|
|
317
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
318
|
-
const ptr0 = passStringToWasm0(html, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
319
|
-
const len0 = WASM_VECTOR_LEN;
|
|
320
|
-
wasm.convert(retptr, ptr0, len0, addHeapObject(options));
|
|
321
|
-
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
322
|
-
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
323
|
-
var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
|
|
324
|
-
var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
|
|
325
|
-
var ptr2 = r0;
|
|
326
|
-
var len2 = r1;
|
|
327
|
-
if (r3) {
|
|
328
|
-
ptr2 = 0; len2 = 0;
|
|
329
|
-
throw takeObject(r2);
|
|
330
|
-
}
|
|
331
|
-
deferred3_0 = ptr2;
|
|
332
|
-
deferred3_1 = len2;
|
|
333
|
-
return getStringFromWasm0(ptr2, len2);
|
|
334
|
-
} finally {
|
|
335
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
336
|
-
wasm.__wbindgen_export4(deferred3_0, deferred3_1, 1);
|
|
337
|
-
}
|
|
336
|
+
export function init() {
|
|
337
|
+
wasm.init();
|
|
338
338
|
}
|
|
339
339
|
|
|
340
340
|
const WasmHtmlExtractionFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
Binary file
|
package/dist-web/package.json
CHANGED
package/package.json
CHANGED