@kreuzberg/html-to-markdown-wasm 3.5.4 → 3.6.0-rc.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/package.json +1 -1
- package/pkg/bundler/html_to_markdown_wasm.d.ts +31 -3
- package/pkg/bundler/html_to_markdown_wasm.js +1 -1
- package/pkg/bundler/html_to_markdown_wasm_bg.js +82 -5
- package/pkg/bundler/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/bundler/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/bundler/package.json +1 -1
- package/pkg/deno/html_to_markdown_wasm.d.ts +31 -3
- package/pkg/deno/html_to_markdown_wasm.js +82 -5
- package/pkg/deno/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/deno/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/nodejs/html_to_markdown_wasm.d.ts +31 -3
- package/pkg/nodejs/html_to_markdown_wasm.js +83 -5
- package/pkg/nodejs/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/nodejs/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/nodejs/package.json +1 -1
- package/pkg/web/html_to_markdown_wasm.d.ts +37 -5
- package/pkg/web/html_to_markdown_wasm.js +82 -5
- package/pkg/web/html_to_markdown_wasm_bg.wasm +0 -0
- package/pkg/web/html_to_markdown_wasm_bg.wasm.d.ts +6 -2
- package/pkg/web/package.json +1 -1
|
@@ -59,7 +59,7 @@ export const wasmconversionoptions_listIndentType: (a: number, b: number) => voi
|
|
|
59
59
|
export const wasmconversionoptions_listIndentWidth: (a: number) => number;
|
|
60
60
|
export const wasmconversionoptions_maxDepth: (a: number) => number;
|
|
61
61
|
export const wasmconversionoptions_maxImageSize: (a: number) => bigint;
|
|
62
|
-
export const wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1:
|
|
62
|
+
export const wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
63
63
|
export const wasmconversionoptions_newlineStyle: (a: number, b: number) => void;
|
|
64
64
|
export const wasmconversionoptions_outputFormat: (a: number, b: number) => void;
|
|
65
65
|
export const wasmconversionoptions_preprocessing: (a: number) => number;
|
|
@@ -102,6 +102,7 @@ export const wasmconversionoptions_set_stripTags: (a: number, b: number, c: numb
|
|
|
102
102
|
export const wasmconversionoptions_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
103
103
|
export const wasmconversionoptions_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
104
104
|
export const wasmconversionoptions_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
105
|
+
export const wasmconversionoptions_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
105
106
|
export const wasmconversionoptions_set_visitor: (a: number, b: number) => void;
|
|
106
107
|
export const wasmconversionoptions_set_whitespaceMode: (a: number, b: number) => void;
|
|
107
108
|
export const wasmconversionoptions_set_wrap: (a: number, b: number) => void;
|
|
@@ -112,6 +113,7 @@ export const wasmconversionoptions_stripTags: (a: number, b: number) => void;
|
|
|
112
113
|
export const wasmconversionoptions_strongEmSymbol: (a: number, b: number) => void;
|
|
113
114
|
export const wasmconversionoptions_subSymbol: (a: number, b: number) => void;
|
|
114
115
|
export const wasmconversionoptions_supSymbol: (a: number, b: number) => void;
|
|
116
|
+
export const wasmconversionoptions_urlEscapeStyle: (a: number, b: number) => void;
|
|
115
117
|
export const wasmconversionoptions_visitor: (a: number) => number;
|
|
116
118
|
export const wasmconversionoptions_whitespaceMode: (a: number, b: number) => void;
|
|
117
119
|
export const wasmconversionoptions_wrap: (a: number) => number;
|
|
@@ -145,7 +147,7 @@ export const wasmconversionoptionsupdate_listIndentType: (a: number, b: number)
|
|
|
145
147
|
export const wasmconversionoptionsupdate_listIndentWidth: (a: number) => number;
|
|
146
148
|
export const wasmconversionoptionsupdate_maxDepth: (a: number) => number;
|
|
147
149
|
export const wasmconversionoptionsupdate_maxImageSize: (a: number, b: number) => void;
|
|
148
|
-
export const wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1:
|
|
150
|
+
export const wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
149
151
|
export const wasmconversionoptionsupdate_newlineStyle: (a: number, b: number) => void;
|
|
150
152
|
export const wasmconversionoptionsupdate_outputFormat: (a: number, b: number) => void;
|
|
151
153
|
export const wasmconversionoptionsupdate_preprocessing: (a: number) => number;
|
|
@@ -188,6 +190,7 @@ export const wasmconversionoptionsupdate_set_stripTags: (a: number, b: number, c
|
|
|
188
190
|
export const wasmconversionoptionsupdate_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
189
191
|
export const wasmconversionoptionsupdate_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
190
192
|
export const wasmconversionoptionsupdate_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
193
|
+
export const wasmconversionoptionsupdate_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
191
194
|
export const wasmconversionoptionsupdate_set_visitor: (a: number, b: number) => void;
|
|
192
195
|
export const wasmconversionoptionsupdate_set_whitespaceMode: (a: number, b: number) => void;
|
|
193
196
|
export const wasmconversionoptionsupdate_set_wrap: (a: number, b: number) => void;
|
|
@@ -198,6 +201,7 @@ export const wasmconversionoptionsupdate_stripTags: (a: number, b: number) => vo
|
|
|
198
201
|
export const wasmconversionoptionsupdate_strongEmSymbol: (a: number, b: number) => void;
|
|
199
202
|
export const wasmconversionoptionsupdate_subSymbol: (a: number, b: number) => void;
|
|
200
203
|
export const wasmconversionoptionsupdate_supSymbol: (a: number, b: number) => void;
|
|
204
|
+
export const wasmconversionoptionsupdate_urlEscapeStyle: (a: number, b: number) => void;
|
|
201
205
|
export const wasmconversionoptionsupdate_visitor: (a: number) => number;
|
|
202
206
|
export const wasmconversionoptionsupdate_whitespaceMode: (a: number, b: number) => void;
|
|
203
207
|
export const wasmconversionoptionsupdate_wrap: (a: number) => number;
|
|
@@ -40,7 +40,7 @@ export class WasmConversionOptions {
|
|
|
40
40
|
free(): void;
|
|
41
41
|
[Symbol.dispose](): void;
|
|
42
42
|
static default(): WasmConversionOptions;
|
|
43
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, maxDepth?: number | null);
|
|
43
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, maxDepth?: number | null);
|
|
44
44
|
autolinks: boolean;
|
|
45
45
|
brInTables: boolean;
|
|
46
46
|
bullets: string;
|
|
@@ -87,6 +87,8 @@ export class WasmConversionOptions {
|
|
|
87
87
|
strongEmSymbol: string;
|
|
88
88
|
subSymbol: string;
|
|
89
89
|
supSymbol: string;
|
|
90
|
+
get urlEscapeStyle(): string;
|
|
91
|
+
set urlEscapeStyle(value: WasmUrlEscapeStyle);
|
|
90
92
|
get visitor(): WasmVisitorHandle | undefined;
|
|
91
93
|
set visitor(value: WasmVisitorHandle | null | undefined);
|
|
92
94
|
get whitespaceMode(): string;
|
|
@@ -105,7 +107,7 @@ export class WasmConversionOptionsUpdate {
|
|
|
105
107
|
free(): void;
|
|
106
108
|
[Symbol.dispose](): void;
|
|
107
109
|
static default(): WasmConversionOptionsUpdate;
|
|
108
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null);
|
|
110
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null);
|
|
109
111
|
get autolinks(): boolean | undefined;
|
|
110
112
|
set autolinks(value: boolean | null | undefined);
|
|
111
113
|
get brInTables(): boolean | undefined;
|
|
@@ -182,6 +184,8 @@ export class WasmConversionOptionsUpdate {
|
|
|
182
184
|
set subSymbol(value: string | null | undefined);
|
|
183
185
|
get supSymbol(): string | undefined;
|
|
184
186
|
set supSymbol(value: string | null | undefined);
|
|
187
|
+
get urlEscapeStyle(): string | undefined;
|
|
188
|
+
set urlEscapeStyle(value: WasmUrlEscapeStyle | null | undefined);
|
|
185
189
|
get visitor(): WasmVisitorHandle | undefined;
|
|
186
190
|
set visitor(value: WasmVisitorHandle | null | undefined);
|
|
187
191
|
get whitespaceMode(): string | undefined;
|
|
@@ -826,6 +830,25 @@ export enum WasmTextDirection {
|
|
|
826
830
|
Auto = 2,
|
|
827
831
|
}
|
|
828
832
|
|
|
833
|
+
/**
|
|
834
|
+
* URL encoding strategy for link and image destinations.
|
|
835
|
+
*
|
|
836
|
+
* Controls how special characters in URL destinations are handled when they
|
|
837
|
+
* require escaping to produce valid Markdown.
|
|
838
|
+
*
|
|
839
|
+
* The `Angle` variant (default) wraps the destination in angle brackets:
|
|
840
|
+
* `[text](<url with spaces>)`. This is the CommonMark-specified escape hatch
|
|
841
|
+
* but breaks when the URL itself contains `>`.
|
|
842
|
+
*
|
|
843
|
+
* The `Percent` variant percent-encodes every character that is not an RFC 3986
|
|
844
|
+
* unreserved character or `/`, producing a destination safe for all Markdown
|
|
845
|
+
* parsers: `[text](url%20with%20spaces)`.
|
|
846
|
+
*/
|
|
847
|
+
export enum WasmUrlEscapeStyle {
|
|
848
|
+
Angle = 0,
|
|
849
|
+
Percent = 1,
|
|
850
|
+
}
|
|
851
|
+
|
|
829
852
|
/**
|
|
830
853
|
* Result of a visitor callback.
|
|
831
854
|
*
|
|
@@ -884,7 +907,12 @@ export enum WasmWhitespaceMode {
|
|
|
884
907
|
* # Arguments
|
|
885
908
|
*
|
|
886
909
|
* * `html` — the HTML string to convert.
|
|
887
|
-
* * `options` —
|
|
910
|
+
* * `options` — conversion options. The parameter bound is
|
|
911
|
+
* `impl Into<Option<ConversionOptions>>`, so any of the following call shapes are accepted:
|
|
912
|
+
* - `convert(html, ConversionOptions.default())` — bare options.
|
|
913
|
+
* - `convert(html, opts)` — bare options.
|
|
914
|
+
* - `convert(html, Some(opts))` — explicit `Option`.
|
|
915
|
+
* - `convert(html, None)` — fall back to `ConversionOptions.default`.
|
|
888
916
|
*
|
|
889
917
|
* # Example
|
|
890
918
|
*
|
|
@@ -507,6 +507,7 @@ class WasmConversionOptions {
|
|
|
507
507
|
* @param {string[] | null} [stripTags]
|
|
508
508
|
* @param {string[] | null} [preserveTags]
|
|
509
509
|
* @param {boolean | null} [skipImages]
|
|
510
|
+
* @param {WasmUrlEscapeStyle | null} [urlEscapeStyle]
|
|
510
511
|
* @param {WasmLinkStyle | null} [linkStyle]
|
|
511
512
|
* @param {WasmOutputFormat | null} [outputFormat]
|
|
512
513
|
* @param {boolean | null} [includeDocumentStructure]
|
|
@@ -517,7 +518,7 @@ class WasmConversionOptions {
|
|
|
517
518
|
* @param {string[] | null} [excludeSelectors]
|
|
518
519
|
* @param {number | null} [maxDepth]
|
|
519
520
|
*/
|
|
520
|
-
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, maxDepth) {
|
|
521
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, excludeSelectors, maxDepth) {
|
|
521
522
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
522
523
|
var len0 = WASM_VECTOR_LEN;
|
|
523
524
|
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -543,7 +544,7 @@ class WasmConversionOptions {
|
|
|
543
544
|
var len9 = WASM_VECTOR_LEN;
|
|
544
545
|
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
545
546
|
var len10 = WASM_VECTOR_LEN;
|
|
546
|
-
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
547
|
+
const ret = wasm.wasmconversionoptions_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, ptr10, len10, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0);
|
|
547
548
|
this.__wbg_ptr = ret;
|
|
548
549
|
WasmConversionOptionsFinalization.register(this, this.__wbg_ptr, this);
|
|
549
550
|
return this;
|
|
@@ -859,6 +860,12 @@ class WasmConversionOptions {
|
|
|
859
860
|
const len0 = WASM_VECTOR_LEN;
|
|
860
861
|
wasm.wasmconversionoptions_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
861
862
|
}
|
|
863
|
+
/**
|
|
864
|
+
* @param {WasmUrlEscapeStyle} value
|
|
865
|
+
*/
|
|
866
|
+
set urlEscapeStyle(value) {
|
|
867
|
+
wasm.wasmconversionoptions_set_urlEscapeStyle(this.__wbg_ptr, value);
|
|
868
|
+
}
|
|
862
869
|
/**
|
|
863
870
|
* @param {WasmVisitorHandle | null} [value]
|
|
864
871
|
*/
|
|
@@ -975,6 +982,25 @@ class WasmConversionOptions {
|
|
|
975
982
|
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
976
983
|
}
|
|
977
984
|
}
|
|
985
|
+
/**
|
|
986
|
+
* @returns {string}
|
|
987
|
+
*/
|
|
988
|
+
get urlEscapeStyle() {
|
|
989
|
+
let deferred1_0;
|
|
990
|
+
let deferred1_1;
|
|
991
|
+
try {
|
|
992
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
993
|
+
wasm.wasmconversionoptions_urlEscapeStyle(retptr, this.__wbg_ptr);
|
|
994
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
995
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
996
|
+
deferred1_0 = r0;
|
|
997
|
+
deferred1_1 = r1;
|
|
998
|
+
return getStringFromWasm0(r0, r1);
|
|
999
|
+
} finally {
|
|
1000
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1001
|
+
wasm.__wbindgen_export4(deferred1_0, deferred1_1, 1);
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
978
1004
|
/**
|
|
979
1005
|
* @returns {WasmVisitorHandle | undefined}
|
|
980
1006
|
*/
|
|
@@ -1405,6 +1431,7 @@ class WasmConversionOptionsUpdate {
|
|
|
1405
1431
|
* @param {string[] | null} [stripTags]
|
|
1406
1432
|
* @param {string[] | null} [preserveTags]
|
|
1407
1433
|
* @param {boolean | null} [skipImages]
|
|
1434
|
+
* @param {WasmUrlEscapeStyle | null} [urlEscapeStyle]
|
|
1408
1435
|
* @param {WasmLinkStyle | null} [linkStyle]
|
|
1409
1436
|
* @param {WasmOutputFormat | null} [outputFormat]
|
|
1410
1437
|
* @param {boolean | null} [includeDocumentStructure]
|
|
@@ -1415,7 +1442,7 @@ class WasmConversionOptionsUpdate {
|
|
|
1415
1442
|
* @param {number | null} [maxDepth]
|
|
1416
1443
|
* @param {string[] | null} [excludeSelectors]
|
|
1417
1444
|
*/
|
|
1418
|
-
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors) {
|
|
1445
|
+
constructor(headingStyle, listIndentType, listIndentWidth, bullets, strongEmSymbol, escapeAsterisks, escapeUnderscores, escapeMisc, escapeAscii, codeLanguage, autolinks, defaultTitle, brInTables, compactTables, highlightStyle, extractMetadata, whitespaceMode, stripNewlines, wrap, wrapWidth, convertAsInline, subSymbol, supSymbol, newlineStyle, codeBlockStyle, keepInlineImagesIn, preprocessing, encoding, debug, stripTags, preserveTags, skipImages, urlEscapeStyle, linkStyle, outputFormat, includeDocumentStructure, extractImages, maxImageSize, captureSvg, inferDimensions, maxDepth, excludeSelectors) {
|
|
1419
1446
|
var ptr0 = isLikeNone(bullets) ? 0 : passStringToWasm0(bullets, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
1420
1447
|
var len0 = WASM_VECTOR_LEN;
|
|
1421
1448
|
var ptr1 = isLikeNone(strongEmSymbol) ? 0 : passStringToWasm0(strongEmSymbol, wasm.__wbindgen_export, wasm.__wbindgen_export2);
|
|
@@ -1441,7 +1468,7 @@ class WasmConversionOptionsUpdate {
|
|
|
1441
1468
|
var len9 = WASM_VECTOR_LEN;
|
|
1442
1469
|
var ptr10 = isLikeNone(excludeSelectors) ? 0 : passArrayJsValueToWasm0(excludeSelectors, wasm.__wbindgen_export);
|
|
1443
1470
|
var len10 = WASM_VECTOR_LEN;
|
|
1444
|
-
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10);
|
|
1471
|
+
const ret = wasm.wasmconversionoptionsupdate_new(isLikeNone(headingStyle) ? 3 : headingStyle, isLikeNone(listIndentType) ? 2 : listIndentType, isLikeNone(listIndentWidth) ? Number.MAX_SAFE_INTEGER : (listIndentWidth) >>> 0, ptr0, len0, ptr1, len1, isLikeNone(escapeAsterisks) ? 0xFFFFFF : escapeAsterisks ? 1 : 0, isLikeNone(escapeUnderscores) ? 0xFFFFFF : escapeUnderscores ? 1 : 0, isLikeNone(escapeMisc) ? 0xFFFFFF : escapeMisc ? 1 : 0, isLikeNone(escapeAscii) ? 0xFFFFFF : escapeAscii ? 1 : 0, ptr2, len2, isLikeNone(autolinks) ? 0xFFFFFF : autolinks ? 1 : 0, isLikeNone(defaultTitle) ? 0xFFFFFF : defaultTitle ? 1 : 0, isLikeNone(brInTables) ? 0xFFFFFF : brInTables ? 1 : 0, isLikeNone(compactTables) ? 0xFFFFFF : compactTables ? 1 : 0, isLikeNone(highlightStyle) ? 4 : highlightStyle, isLikeNone(extractMetadata) ? 0xFFFFFF : extractMetadata ? 1 : 0, isLikeNone(whitespaceMode) ? 2 : whitespaceMode, isLikeNone(stripNewlines) ? 0xFFFFFF : stripNewlines ? 1 : 0, isLikeNone(wrap) ? 0xFFFFFF : wrap ? 1 : 0, isLikeNone(wrapWidth) ? Number.MAX_SAFE_INTEGER : (wrapWidth) >>> 0, isLikeNone(convertAsInline) ? 0xFFFFFF : convertAsInline ? 1 : 0, ptr3, len3, ptr4, len4, isLikeNone(newlineStyle) ? 2 : newlineStyle, isLikeNone(codeBlockStyle) ? 3 : codeBlockStyle, ptr5, len5, ptr6, ptr7, len7, isLikeNone(debug) ? 0xFFFFFF : debug ? 1 : 0, ptr8, len8, ptr9, len9, isLikeNone(skipImages) ? 0xFFFFFF : skipImages ? 1 : 0, isLikeNone(urlEscapeStyle) ? 2 : urlEscapeStyle, isLikeNone(linkStyle) ? 2 : linkStyle, isLikeNone(outputFormat) ? 3 : outputFormat, isLikeNone(includeDocumentStructure) ? 0xFFFFFF : includeDocumentStructure ? 1 : 0, isLikeNone(extractImages) ? 0xFFFFFF : extractImages ? 1 : 0, !isLikeNone(maxImageSize), isLikeNone(maxImageSize) ? BigInt(0) : maxImageSize, isLikeNone(captureSvg) ? 0xFFFFFF : captureSvg ? 1 : 0, isLikeNone(inferDimensions) ? 0xFFFFFF : inferDimensions ? 1 : 0, isLikeNone(maxDepth) ? Number.MAX_SAFE_INTEGER : (maxDepth) >>> 0, ptr10, len10);
|
|
1445
1472
|
this.__wbg_ptr = ret;
|
|
1446
1473
|
WasmConversionOptionsUpdateFinalization.register(this, this.__wbg_ptr, this);
|
|
1447
1474
|
return this;
|
|
@@ -1763,6 +1790,12 @@ class WasmConversionOptionsUpdate {
|
|
|
1763
1790
|
var len0 = WASM_VECTOR_LEN;
|
|
1764
1791
|
wasm.wasmconversionoptionsupdate_set_supSymbol(this.__wbg_ptr, ptr0, len0);
|
|
1765
1792
|
}
|
|
1793
|
+
/**
|
|
1794
|
+
* @param {WasmUrlEscapeStyle | null} [value]
|
|
1795
|
+
*/
|
|
1796
|
+
set urlEscapeStyle(value) {
|
|
1797
|
+
wasm.wasmconversionoptionsupdate_set_urlEscapeStyle(this.__wbg_ptr, isLikeNone(value) ? 2 : value);
|
|
1798
|
+
}
|
|
1766
1799
|
/**
|
|
1767
1800
|
* @param {WasmVisitorHandle | null} [value]
|
|
1768
1801
|
*/
|
|
@@ -1882,6 +1915,25 @@ class WasmConversionOptionsUpdate {
|
|
|
1882
1915
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1883
1916
|
}
|
|
1884
1917
|
}
|
|
1918
|
+
/**
|
|
1919
|
+
* @returns {string | undefined}
|
|
1920
|
+
*/
|
|
1921
|
+
get urlEscapeStyle() {
|
|
1922
|
+
try {
|
|
1923
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1924
|
+
wasm.wasmconversionoptionsupdate_urlEscapeStyle(retptr, this.__wbg_ptr);
|
|
1925
|
+
var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
|
|
1926
|
+
var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
|
|
1927
|
+
let v1;
|
|
1928
|
+
if (r0 !== 0) {
|
|
1929
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
1930
|
+
wasm.__wbindgen_export4(r0, r1 * 1, 1);
|
|
1931
|
+
}
|
|
1932
|
+
return v1;
|
|
1933
|
+
} finally {
|
|
1934
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1935
|
+
}
|
|
1936
|
+
}
|
|
1885
1937
|
/**
|
|
1886
1938
|
* @returns {WasmVisitorHandle | undefined}
|
|
1887
1939
|
*/
|
|
@@ -5217,6 +5269,27 @@ const WasmTextDirection = Object.freeze({
|
|
|
5217
5269
|
});
|
|
5218
5270
|
exports.WasmTextDirection = WasmTextDirection;
|
|
5219
5271
|
|
|
5272
|
+
/**
|
|
5273
|
+
* URL encoding strategy for link and image destinations.
|
|
5274
|
+
*
|
|
5275
|
+
* Controls how special characters in URL destinations are handled when they
|
|
5276
|
+
* require escaping to produce valid Markdown.
|
|
5277
|
+
*
|
|
5278
|
+
* The `Angle` variant (default) wraps the destination in angle brackets:
|
|
5279
|
+
* `[text](<url with spaces>)`. This is the CommonMark-specified escape hatch
|
|
5280
|
+
* but breaks when the URL itself contains `>`.
|
|
5281
|
+
*
|
|
5282
|
+
* The `Percent` variant percent-encodes every character that is not an RFC 3986
|
|
5283
|
+
* unreserved character or `/`, producing a destination safe for all Markdown
|
|
5284
|
+
* parsers: `[text](url%20with%20spaces)`.
|
|
5285
|
+
* @enum {0 | 1}
|
|
5286
|
+
*/
|
|
5287
|
+
const WasmUrlEscapeStyle = Object.freeze({
|
|
5288
|
+
Angle: 0, "0": "Angle",
|
|
5289
|
+
Percent: 1, "1": "Percent",
|
|
5290
|
+
});
|
|
5291
|
+
exports.WasmUrlEscapeStyle = WasmUrlEscapeStyle;
|
|
5292
|
+
|
|
5220
5293
|
/**
|
|
5221
5294
|
* Result of a visitor callback.
|
|
5222
5295
|
*
|
|
@@ -5305,7 +5378,12 @@ exports.WasmWhitespaceMode = WasmWhitespaceMode;
|
|
|
5305
5378
|
* # Arguments
|
|
5306
5379
|
*
|
|
5307
5380
|
* * `html` — the HTML string to convert.
|
|
5308
|
-
* * `options` —
|
|
5381
|
+
* * `options` — conversion options. The parameter bound is
|
|
5382
|
+
* `impl Into<Option<ConversionOptions>>`, so any of the following call shapes are accepted:
|
|
5383
|
+
* - `convert(html, ConversionOptions.default())` — bare options.
|
|
5384
|
+
* - `convert(html, opts)` — bare options.
|
|
5385
|
+
* - `convert(html, Some(opts))` — explicit `Option`.
|
|
5386
|
+
* - `convert(html, None)` — fall back to `ConversionOptions.default`.
|
|
5309
5387
|
*
|
|
5310
5388
|
* # Example
|
|
5311
5389
|
*
|
|
Binary file
|
|
@@ -59,7 +59,7 @@ export const wasmconversionoptions_listIndentType: (a: number, b: number) => voi
|
|
|
59
59
|
export const wasmconversionoptions_listIndentWidth: (a: number) => number;
|
|
60
60
|
export const wasmconversionoptions_maxDepth: (a: number) => number;
|
|
61
61
|
export const wasmconversionoptions_maxImageSize: (a: number) => bigint;
|
|
62
|
-
export const wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1:
|
|
62
|
+
export const wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
63
63
|
export const wasmconversionoptions_newlineStyle: (a: number, b: number) => void;
|
|
64
64
|
export const wasmconversionoptions_outputFormat: (a: number, b: number) => void;
|
|
65
65
|
export const wasmconversionoptions_preprocessing: (a: number) => number;
|
|
@@ -102,6 +102,7 @@ export const wasmconversionoptions_set_stripTags: (a: number, b: number, c: numb
|
|
|
102
102
|
export const wasmconversionoptions_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
103
103
|
export const wasmconversionoptions_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
104
104
|
export const wasmconversionoptions_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
105
|
+
export const wasmconversionoptions_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
105
106
|
export const wasmconversionoptions_set_visitor: (a: number, b: number) => void;
|
|
106
107
|
export const wasmconversionoptions_set_whitespaceMode: (a: number, b: number) => void;
|
|
107
108
|
export const wasmconversionoptions_set_wrap: (a: number, b: number) => void;
|
|
@@ -112,6 +113,7 @@ export const wasmconversionoptions_stripTags: (a: number, b: number) => void;
|
|
|
112
113
|
export const wasmconversionoptions_strongEmSymbol: (a: number, b: number) => void;
|
|
113
114
|
export const wasmconversionoptions_subSymbol: (a: number, b: number) => void;
|
|
114
115
|
export const wasmconversionoptions_supSymbol: (a: number, b: number) => void;
|
|
116
|
+
export const wasmconversionoptions_urlEscapeStyle: (a: number, b: number) => void;
|
|
115
117
|
export const wasmconversionoptions_visitor: (a: number) => number;
|
|
116
118
|
export const wasmconversionoptions_whitespaceMode: (a: number, b: number) => void;
|
|
117
119
|
export const wasmconversionoptions_wrap: (a: number) => number;
|
|
@@ -145,7 +147,7 @@ export const wasmconversionoptionsupdate_listIndentType: (a: number, b: number)
|
|
|
145
147
|
export const wasmconversionoptionsupdate_listIndentWidth: (a: number) => number;
|
|
146
148
|
export const wasmconversionoptionsupdate_maxDepth: (a: number) => number;
|
|
147
149
|
export const wasmconversionoptionsupdate_maxImageSize: (a: number, b: number) => void;
|
|
148
|
-
export const wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1:
|
|
150
|
+
export const wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
149
151
|
export const wasmconversionoptionsupdate_newlineStyle: (a: number, b: number) => void;
|
|
150
152
|
export const wasmconversionoptionsupdate_outputFormat: (a: number, b: number) => void;
|
|
151
153
|
export const wasmconversionoptionsupdate_preprocessing: (a: number) => number;
|
|
@@ -188,6 +190,7 @@ export const wasmconversionoptionsupdate_set_stripTags: (a: number, b: number, c
|
|
|
188
190
|
export const wasmconversionoptionsupdate_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
189
191
|
export const wasmconversionoptionsupdate_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
190
192
|
export const wasmconversionoptionsupdate_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
193
|
+
export const wasmconversionoptionsupdate_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
191
194
|
export const wasmconversionoptionsupdate_set_visitor: (a: number, b: number) => void;
|
|
192
195
|
export const wasmconversionoptionsupdate_set_whitespaceMode: (a: number, b: number) => void;
|
|
193
196
|
export const wasmconversionoptionsupdate_set_wrap: (a: number, b: number) => void;
|
|
@@ -198,6 +201,7 @@ export const wasmconversionoptionsupdate_stripTags: (a: number, b: number) => vo
|
|
|
198
201
|
export const wasmconversionoptionsupdate_strongEmSymbol: (a: number, b: number) => void;
|
|
199
202
|
export const wasmconversionoptionsupdate_subSymbol: (a: number, b: number) => void;
|
|
200
203
|
export const wasmconversionoptionsupdate_supSymbol: (a: number, b: number) => void;
|
|
204
|
+
export const wasmconversionoptionsupdate_urlEscapeStyle: (a: number, b: number) => void;
|
|
201
205
|
export const wasmconversionoptionsupdate_visitor: (a: number) => number;
|
|
202
206
|
export const wasmconversionoptionsupdate_whitespaceMode: (a: number, b: number) => void;
|
|
203
207
|
export const wasmconversionoptionsupdate_wrap: (a: number) => number;
|
package/pkg/nodejs/package.json
CHANGED
|
@@ -40,7 +40,7 @@ export class WasmConversionOptions {
|
|
|
40
40
|
free(): void;
|
|
41
41
|
[Symbol.dispose](): void;
|
|
42
42
|
static default(): WasmConversionOptions;
|
|
43
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, maxDepth?: number | null);
|
|
43
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptions | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, excludeSelectors?: string[] | null, maxDepth?: number | null);
|
|
44
44
|
autolinks: boolean;
|
|
45
45
|
brInTables: boolean;
|
|
46
46
|
bullets: string;
|
|
@@ -87,6 +87,8 @@ export class WasmConversionOptions {
|
|
|
87
87
|
strongEmSymbol: string;
|
|
88
88
|
subSymbol: string;
|
|
89
89
|
supSymbol: string;
|
|
90
|
+
get urlEscapeStyle(): string;
|
|
91
|
+
set urlEscapeStyle(value: WasmUrlEscapeStyle);
|
|
90
92
|
get visitor(): WasmVisitorHandle | undefined;
|
|
91
93
|
set visitor(value: WasmVisitorHandle | null | undefined);
|
|
92
94
|
get whitespaceMode(): string;
|
|
@@ -105,7 +107,7 @@ export class WasmConversionOptionsUpdate {
|
|
|
105
107
|
free(): void;
|
|
106
108
|
[Symbol.dispose](): void;
|
|
107
109
|
static default(): WasmConversionOptionsUpdate;
|
|
108
|
-
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null);
|
|
110
|
+
constructor(headingStyle?: WasmHeadingStyle | null, listIndentType?: WasmListIndentType | null, listIndentWidth?: number | null, bullets?: string | null, strongEmSymbol?: string | null, escapeAsterisks?: boolean | null, escapeUnderscores?: boolean | null, escapeMisc?: boolean | null, escapeAscii?: boolean | null, codeLanguage?: string | null, autolinks?: boolean | null, defaultTitle?: boolean | null, brInTables?: boolean | null, compactTables?: boolean | null, highlightStyle?: WasmHighlightStyle | null, extractMetadata?: boolean | null, whitespaceMode?: WasmWhitespaceMode | null, stripNewlines?: boolean | null, wrap?: boolean | null, wrapWidth?: number | null, convertAsInline?: boolean | null, subSymbol?: string | null, supSymbol?: string | null, newlineStyle?: WasmNewlineStyle | null, codeBlockStyle?: WasmCodeBlockStyle | null, keepInlineImagesIn?: string[] | null, preprocessing?: WasmPreprocessingOptionsUpdate | null, encoding?: string | null, debug?: boolean | null, stripTags?: string[] | null, preserveTags?: string[] | null, skipImages?: boolean | null, urlEscapeStyle?: WasmUrlEscapeStyle | null, linkStyle?: WasmLinkStyle | null, outputFormat?: WasmOutputFormat | null, includeDocumentStructure?: boolean | null, extractImages?: boolean | null, maxImageSize?: bigint | null, captureSvg?: boolean | null, inferDimensions?: boolean | null, maxDepth?: number | null, excludeSelectors?: string[] | null);
|
|
109
111
|
get autolinks(): boolean | undefined;
|
|
110
112
|
set autolinks(value: boolean | null | undefined);
|
|
111
113
|
get brInTables(): boolean | undefined;
|
|
@@ -182,6 +184,8 @@ export class WasmConversionOptionsUpdate {
|
|
|
182
184
|
set subSymbol(value: string | null | undefined);
|
|
183
185
|
get supSymbol(): string | undefined;
|
|
184
186
|
set supSymbol(value: string | null | undefined);
|
|
187
|
+
get urlEscapeStyle(): string | undefined;
|
|
188
|
+
set urlEscapeStyle(value: WasmUrlEscapeStyle | null | undefined);
|
|
185
189
|
get visitor(): WasmVisitorHandle | undefined;
|
|
186
190
|
set visitor(value: WasmVisitorHandle | null | undefined);
|
|
187
191
|
get whitespaceMode(): string | undefined;
|
|
@@ -826,6 +830,25 @@ export enum WasmTextDirection {
|
|
|
826
830
|
Auto = 2,
|
|
827
831
|
}
|
|
828
832
|
|
|
833
|
+
/**
|
|
834
|
+
* URL encoding strategy for link and image destinations.
|
|
835
|
+
*
|
|
836
|
+
* Controls how special characters in URL destinations are handled when they
|
|
837
|
+
* require escaping to produce valid Markdown.
|
|
838
|
+
*
|
|
839
|
+
* The `Angle` variant (default) wraps the destination in angle brackets:
|
|
840
|
+
* `[text](<url with spaces>)`. This is the CommonMark-specified escape hatch
|
|
841
|
+
* but breaks when the URL itself contains `>`.
|
|
842
|
+
*
|
|
843
|
+
* The `Percent` variant percent-encodes every character that is not an RFC 3986
|
|
844
|
+
* unreserved character or `/`, producing a destination safe for all Markdown
|
|
845
|
+
* parsers: `[text](url%20with%20spaces)`.
|
|
846
|
+
*/
|
|
847
|
+
export enum WasmUrlEscapeStyle {
|
|
848
|
+
Angle = 0,
|
|
849
|
+
Percent = 1,
|
|
850
|
+
}
|
|
851
|
+
|
|
829
852
|
/**
|
|
830
853
|
* Result of a visitor callback.
|
|
831
854
|
*
|
|
@@ -884,7 +907,12 @@ export enum WasmWhitespaceMode {
|
|
|
884
907
|
* # Arguments
|
|
885
908
|
*
|
|
886
909
|
* * `html` — the HTML string to convert.
|
|
887
|
-
* * `options` —
|
|
910
|
+
* * `options` — conversion options. The parameter bound is
|
|
911
|
+
* `impl Into<Option<ConversionOptions>>`, so any of the following call shapes are accepted:
|
|
912
|
+
* - `convert(html, ConversionOptions.default())` — bare options.
|
|
913
|
+
* - `convert(html, opts)` — bare options.
|
|
914
|
+
* - `convert(html, Some(opts))` — explicit `Option`.
|
|
915
|
+
* - `convert(html, None)` — fall back to `ConversionOptions.default`.
|
|
888
916
|
*
|
|
889
917
|
* # Example
|
|
890
918
|
*
|
|
@@ -957,7 +985,7 @@ export interface InitOutput {
|
|
|
957
985
|
readonly wasmconversionoptions_listIndentWidth: (a: number) => number;
|
|
958
986
|
readonly wasmconversionoptions_maxDepth: (a: number) => number;
|
|
959
987
|
readonly wasmconversionoptions_maxImageSize: (a: number) => bigint;
|
|
960
|
-
readonly wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1:
|
|
988
|
+
readonly wasmconversionoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
961
989
|
readonly wasmconversionoptions_newlineStyle: (a: number, b: number) => void;
|
|
962
990
|
readonly wasmconversionoptions_outputFormat: (a: number, b: number) => void;
|
|
963
991
|
readonly wasmconversionoptions_preprocessing: (a: number) => number;
|
|
@@ -1000,6 +1028,7 @@ export interface InitOutput {
|
|
|
1000
1028
|
readonly wasmconversionoptions_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
1001
1029
|
readonly wasmconversionoptions_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
1002
1030
|
readonly wasmconversionoptions_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
1031
|
+
readonly wasmconversionoptions_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
1003
1032
|
readonly wasmconversionoptions_set_visitor: (a: number, b: number) => void;
|
|
1004
1033
|
readonly wasmconversionoptions_set_whitespaceMode: (a: number, b: number) => void;
|
|
1005
1034
|
readonly wasmconversionoptions_set_wrap: (a: number, b: number) => void;
|
|
@@ -1010,6 +1039,7 @@ export interface InitOutput {
|
|
|
1010
1039
|
readonly wasmconversionoptions_strongEmSymbol: (a: number, b: number) => void;
|
|
1011
1040
|
readonly wasmconversionoptions_subSymbol: (a: number, b: number) => void;
|
|
1012
1041
|
readonly wasmconversionoptions_supSymbol: (a: number, b: number) => void;
|
|
1042
|
+
readonly wasmconversionoptions_urlEscapeStyle: (a: number, b: number) => void;
|
|
1013
1043
|
readonly wasmconversionoptions_visitor: (a: number) => number;
|
|
1014
1044
|
readonly wasmconversionoptions_whitespaceMode: (a: number, b: number) => void;
|
|
1015
1045
|
readonly wasmconversionoptions_wrap: (a: number) => number;
|
|
@@ -1043,7 +1073,7 @@ export interface InitOutput {
|
|
|
1043
1073
|
readonly wasmconversionoptionsupdate_listIndentWidth: (a: number) => number;
|
|
1044
1074
|
readonly wasmconversionoptionsupdate_maxDepth: (a: number) => number;
|
|
1045
1075
|
readonly wasmconversionoptionsupdate_maxImageSize: (a: number, b: number) => void;
|
|
1046
|
-
readonly wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1:
|
|
1076
|
+
readonly wasmconversionoptionsupdate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: number, s: number, t: number, u: number, v: number, w: number, x: number, y: number, z: number, a1: number, b1: number, c1: number, d1: number, e1: number, f1: number, g1: number, h1: number, i1: number, j1: number, k1: number, l1: number, m1: number, n1: number, o1: number, p1: number, q1: number, r1: number, s1: number, t1: number, u1: number, v1: bigint, w1: number, x1: number, y1: number, z1: number, a2: number) => number;
|
|
1047
1077
|
readonly wasmconversionoptionsupdate_newlineStyle: (a: number, b: number) => void;
|
|
1048
1078
|
readonly wasmconversionoptionsupdate_outputFormat: (a: number, b: number) => void;
|
|
1049
1079
|
readonly wasmconversionoptionsupdate_preprocessing: (a: number) => number;
|
|
@@ -1086,6 +1116,7 @@ export interface InitOutput {
|
|
|
1086
1116
|
readonly wasmconversionoptionsupdate_set_strongEmSymbol: (a: number, b: number, c: number) => void;
|
|
1087
1117
|
readonly wasmconversionoptionsupdate_set_subSymbol: (a: number, b: number, c: number) => void;
|
|
1088
1118
|
readonly wasmconversionoptionsupdate_set_supSymbol: (a: number, b: number, c: number) => void;
|
|
1119
|
+
readonly wasmconversionoptionsupdate_set_urlEscapeStyle: (a: number, b: number) => void;
|
|
1089
1120
|
readonly wasmconversionoptionsupdate_set_visitor: (a: number, b: number) => void;
|
|
1090
1121
|
readonly wasmconversionoptionsupdate_set_whitespaceMode: (a: number, b: number) => void;
|
|
1091
1122
|
readonly wasmconversionoptionsupdate_set_wrap: (a: number, b: number) => void;
|
|
@@ -1096,6 +1127,7 @@ export interface InitOutput {
|
|
|
1096
1127
|
readonly wasmconversionoptionsupdate_strongEmSymbol: (a: number, b: number) => void;
|
|
1097
1128
|
readonly wasmconversionoptionsupdate_subSymbol: (a: number, b: number) => void;
|
|
1098
1129
|
readonly wasmconversionoptionsupdate_supSymbol: (a: number, b: number) => void;
|
|
1130
|
+
readonly wasmconversionoptionsupdate_urlEscapeStyle: (a: number, b: number) => void;
|
|
1099
1131
|
readonly wasmconversionoptionsupdate_visitor: (a: number) => number;
|
|
1100
1132
|
readonly wasmconversionoptionsupdate_whitespaceMode: (a: number, b: number) => void;
|
|
1101
1133
|
readonly wasmconversionoptionsupdate_wrap: (a: number) => number;
|