@hongdown/wasm 0.2.0-dev.78 → 0.2.0-dev.80
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/hongdown_bg.wasm +0 -0
- package/dist/index.cjs +61 -0
- package/dist/index.d.cts +72 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +72 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +61 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/hongdown_bg.wasm
CHANGED
|
Binary file
|
package/dist/index.cjs
CHANGED
|
@@ -169,6 +169,31 @@ function format$1(input, options) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
|
+
* Format Markdown with an optional code formatter callback.
|
|
173
|
+
*
|
|
174
|
+
* # Arguments
|
|
175
|
+
*
|
|
176
|
+
* * `input` - Markdown source to format
|
|
177
|
+
* * `options` - Optional formatting options as a JavaScript object
|
|
178
|
+
* * `code_formatter` - Optional JavaScript callback function `(language: string, code: string) => string | null`
|
|
179
|
+
* that formats code blocks. Return the formatted code, or null/undefined to keep the original.
|
|
180
|
+
*
|
|
181
|
+
* # Returns
|
|
182
|
+
*
|
|
183
|
+
* An object with `output` (formatted string) and `warnings` (array of warning objects).
|
|
184
|
+
* @param {string} input
|
|
185
|
+
* @param {any} options
|
|
186
|
+
* @param {Function | null} [code_formatter]
|
|
187
|
+
* @returns {any}
|
|
188
|
+
*/
|
|
189
|
+
function formatWithCodeFormatter$1(input, options, code_formatter) {
|
|
190
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
191
|
+
const len0 = WASM_VECTOR_LEN;
|
|
192
|
+
const ret = wasm.formatWithCodeFormatter(ptr0, len0, options, isLikeNone(code_formatter) ? 0 : addToExternrefTable0(code_formatter));
|
|
193
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
194
|
+
return takeFromExternrefTable0(ret[0]);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
172
197
|
* Format Markdown and return both output and warnings.
|
|
173
198
|
*
|
|
174
199
|
* # Arguments
|
|
@@ -293,6 +318,11 @@ function __wbg_get_imports() {
|
|
|
293
318
|
return arg0.call(arg1);
|
|
294
319
|
}, arguments);
|
|
295
320
|
};
|
|
321
|
+
imports.wbg.__wbg_call_c8baa5c5e72d274e = function() {
|
|
322
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
323
|
+
return arg0.call(arg1, arg2, arg3);
|
|
324
|
+
}, arguments);
|
|
325
|
+
};
|
|
296
326
|
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
297
327
|
return arg0.done;
|
|
298
328
|
};
|
|
@@ -502,7 +532,38 @@ async function formatWithWarnings(input, options = {}) {
|
|
|
502
532
|
await ensureInitialized();
|
|
503
533
|
return formatWithWarnings$1(input, options);
|
|
504
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* Format Markdown with an optional code formatter callback.
|
|
537
|
+
*
|
|
538
|
+
* This function allows you to provide a callback that formats code blocks
|
|
539
|
+
* using external formatters (e.g., Prettier, ESLint).
|
|
540
|
+
*
|
|
541
|
+
* @param input - Markdown source to format
|
|
542
|
+
* @param options - Formatting options with optional code formatter callback
|
|
543
|
+
* @returns Object with formatted output and any warnings
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```typescript
|
|
547
|
+
* import { formatWithCodeFormatter } from "@hongdown/wasm";
|
|
548
|
+
* import * as prettier from "prettier";
|
|
549
|
+
*
|
|
550
|
+
* const { output, warnings } = await formatWithCodeFormatter(markdown, {
|
|
551
|
+
* codeFormatter: (language, code) => {
|
|
552
|
+
* if (language === "javascript" || language === "typescript") {
|
|
553
|
+
* return prettier.format(code, { parser: "babel" });
|
|
554
|
+
* }
|
|
555
|
+
* return null; // Keep original for other languages
|
|
556
|
+
* },
|
|
557
|
+
* });
|
|
558
|
+
* ```
|
|
559
|
+
*/
|
|
560
|
+
async function formatWithCodeFormatter(input, options = {}) {
|
|
561
|
+
await ensureInitialized();
|
|
562
|
+
const { codeFormatter, ...restOptions } = options;
|
|
563
|
+
return formatWithCodeFormatter$1(input, restOptions, codeFormatter ?? null);
|
|
564
|
+
}
|
|
505
565
|
|
|
506
566
|
//#endregion
|
|
507
567
|
exports.format = format;
|
|
568
|
+
exports.formatWithCodeFormatter = formatWithCodeFormatter;
|
|
508
569
|
exports.formatWithWarnings = formatWithWarnings;
|
package/dist/index.d.cts
CHANGED
|
@@ -167,6 +167,51 @@ interface FormatOptions {
|
|
|
167
167
|
*/
|
|
168
168
|
emDash?: DashSetting;
|
|
169
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Callback function for formatting code blocks.
|
|
172
|
+
*
|
|
173
|
+
* The callback receives the language identifier and code content,
|
|
174
|
+
* and should return the formatted code or null/undefined to keep the original.
|
|
175
|
+
*
|
|
176
|
+
* @param language - The language identifier of the code block (e.g., "javascript", "python")
|
|
177
|
+
* @param code - The code content to format
|
|
178
|
+
* @returns The formatted code, or null/undefined to keep the original
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* const codeFormatter: CodeFormatterCallback = (language, code) => {
|
|
183
|
+
* if (language === "javascript") {
|
|
184
|
+
* return prettier.format(code, { parser: "babel" });
|
|
185
|
+
* }
|
|
186
|
+
* return null; // Keep original for other languages
|
|
187
|
+
* };
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
type CodeFormatterCallback = (language: string, code: string) => string | null | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Formatting options with an optional code formatter callback.
|
|
193
|
+
*/
|
|
194
|
+
interface FormatWithCodeFormatterOptions extends FormatOptions {
|
|
195
|
+
/**
|
|
196
|
+
* Optional callback to format code blocks.
|
|
197
|
+
*
|
|
198
|
+
* When provided, this callback is called for each code block with a language identifier.
|
|
199
|
+
* Return the formatted code, or null/undefined to keep the original content.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* const options = {
|
|
204
|
+
* codeFormatter: (language, code) => {
|
|
205
|
+
* if (language === "javascript") {
|
|
206
|
+
* return prettier.format(code, { parser: "babel" });
|
|
207
|
+
* }
|
|
208
|
+
* return null;
|
|
209
|
+
* },
|
|
210
|
+
* };
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
codeFormatter?: CodeFormatterCallback;
|
|
214
|
+
}
|
|
170
215
|
/**
|
|
171
216
|
* A warning generated during formatting.
|
|
172
217
|
*/
|
|
@@ -252,6 +297,32 @@ declare function format(input: string, options?: FormatOptions): Promise<string>
|
|
|
252
297
|
* ```
|
|
253
298
|
*/
|
|
254
299
|
declare function formatWithWarnings(input: string, options?: FormatOptions): Promise<FormatResult>;
|
|
300
|
+
/**
|
|
301
|
+
* Format Markdown with an optional code formatter callback.
|
|
302
|
+
*
|
|
303
|
+
* This function allows you to provide a callback that formats code blocks
|
|
304
|
+
* using external formatters (e.g., Prettier, ESLint).
|
|
305
|
+
*
|
|
306
|
+
* @param input - Markdown source to format
|
|
307
|
+
* @param options - Formatting options with optional code formatter callback
|
|
308
|
+
* @returns Object with formatted output and any warnings
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```typescript
|
|
312
|
+
* import { formatWithCodeFormatter } from "@hongdown/wasm";
|
|
313
|
+
* import * as prettier from "prettier";
|
|
314
|
+
*
|
|
315
|
+
* const { output, warnings } = await formatWithCodeFormatter(markdown, {
|
|
316
|
+
* codeFormatter: (language, code) => {
|
|
317
|
+
* if (language === "javascript" || language === "typescript") {
|
|
318
|
+
* return prettier.format(code, { parser: "babel" });
|
|
319
|
+
* }
|
|
320
|
+
* return null; // Keep original for other languages
|
|
321
|
+
* },
|
|
322
|
+
* });
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
declare function formatWithCodeFormatter(input: string, options?: FormatWithCodeFormatterOptions): Promise<FormatResult>;
|
|
255
326
|
//#endregion
|
|
256
|
-
export { type DashSetting, type FormatOptions, type FormatResult, type OrderedListPad, type Warning, format, formatWithWarnings };
|
|
327
|
+
export { type CodeFormatterCallback, type DashSetting, type FormatOptions, type FormatResult, type FormatWithCodeFormatterOptions, type OrderedListPad, type Warning, format, formatWithCodeFormatter, formatWithWarnings };
|
|
257
328
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;AAMA;AAQA;AAOA;;;AA4KW,KA3LC,cAAA,GA2LD,OAAA,GAAA,KAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;AAMA;AAQA;AAOA;;;AA4KW,KA3LC,cAAA,GA2LD,OAAA,GAAA,KAAA;;AAuBX;AAQA;AAyBA;AAeA;;KA1PY,WAAA;;ACsEZ;AA+BA;;;AAGG,UDjGc,aAAA,CCiGd;EAAO;AA8BV;;;EAGG,SAAA,CAAA,EAAA,MAAA;EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBD7CS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+ER;;;;;;;WAQA;;;;;;;;;;;;;;;;;;;;;;KAuBC,qBAAA;;;;UAQK,8BAAA,SAAuC;;;;;;;;;;;;;;;;;;;kBAmBtC;;;;;UAMD,OAAA;;;;;;;;;;;;;UAeA,YAAA;;;;;;;;YASL;;;;;AC9JZ;;;;;AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhEsB,MAAA,0BAEX,gBACR;;;;;;;;;;;;;;;;;;;;;;;;iBA4BmB,kBAAA,0BAEX,gBACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BW,uBAAA,0BAEX,iCACR,QAAQ"}
|
package/dist/index.d.mts
CHANGED
|
@@ -167,6 +167,51 @@ interface FormatOptions {
|
|
|
167
167
|
*/
|
|
168
168
|
emDash?: DashSetting;
|
|
169
169
|
}
|
|
170
|
+
/**
|
|
171
|
+
* Callback function for formatting code blocks.
|
|
172
|
+
*
|
|
173
|
+
* The callback receives the language identifier and code content,
|
|
174
|
+
* and should return the formatted code or null/undefined to keep the original.
|
|
175
|
+
*
|
|
176
|
+
* @param language - The language identifier of the code block (e.g., "javascript", "python")
|
|
177
|
+
* @param code - The code content to format
|
|
178
|
+
* @returns The formatted code, or null/undefined to keep the original
|
|
179
|
+
*
|
|
180
|
+
* @example
|
|
181
|
+
* ```typescript
|
|
182
|
+
* const codeFormatter: CodeFormatterCallback = (language, code) => {
|
|
183
|
+
* if (language === "javascript") {
|
|
184
|
+
* return prettier.format(code, { parser: "babel" });
|
|
185
|
+
* }
|
|
186
|
+
* return null; // Keep original for other languages
|
|
187
|
+
* };
|
|
188
|
+
* ```
|
|
189
|
+
*/
|
|
190
|
+
type CodeFormatterCallback = (language: string, code: string) => string | null | undefined;
|
|
191
|
+
/**
|
|
192
|
+
* Formatting options with an optional code formatter callback.
|
|
193
|
+
*/
|
|
194
|
+
interface FormatWithCodeFormatterOptions extends FormatOptions {
|
|
195
|
+
/**
|
|
196
|
+
* Optional callback to format code blocks.
|
|
197
|
+
*
|
|
198
|
+
* When provided, this callback is called for each code block with a language identifier.
|
|
199
|
+
* Return the formatted code, or null/undefined to keep the original content.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* const options = {
|
|
204
|
+
* codeFormatter: (language, code) => {
|
|
205
|
+
* if (language === "javascript") {
|
|
206
|
+
* return prettier.format(code, { parser: "babel" });
|
|
207
|
+
* }
|
|
208
|
+
* return null;
|
|
209
|
+
* },
|
|
210
|
+
* };
|
|
211
|
+
* ```
|
|
212
|
+
*/
|
|
213
|
+
codeFormatter?: CodeFormatterCallback;
|
|
214
|
+
}
|
|
170
215
|
/**
|
|
171
216
|
* A warning generated during formatting.
|
|
172
217
|
*/
|
|
@@ -252,6 +297,32 @@ declare function format(input: string, options?: FormatOptions): Promise<string>
|
|
|
252
297
|
* ```
|
|
253
298
|
*/
|
|
254
299
|
declare function formatWithWarnings(input: string, options?: FormatOptions): Promise<FormatResult>;
|
|
300
|
+
/**
|
|
301
|
+
* Format Markdown with an optional code formatter callback.
|
|
302
|
+
*
|
|
303
|
+
* This function allows you to provide a callback that formats code blocks
|
|
304
|
+
* using external formatters (e.g., Prettier, ESLint).
|
|
305
|
+
*
|
|
306
|
+
* @param input - Markdown source to format
|
|
307
|
+
* @param options - Formatting options with optional code formatter callback
|
|
308
|
+
* @returns Object with formatted output and any warnings
|
|
309
|
+
*
|
|
310
|
+
* @example
|
|
311
|
+
* ```typescript
|
|
312
|
+
* import { formatWithCodeFormatter } from "@hongdown/wasm";
|
|
313
|
+
* import * as prettier from "prettier";
|
|
314
|
+
*
|
|
315
|
+
* const { output, warnings } = await formatWithCodeFormatter(markdown, {
|
|
316
|
+
* codeFormatter: (language, code) => {
|
|
317
|
+
* if (language === "javascript" || language === "typescript") {
|
|
318
|
+
* return prettier.format(code, { parser: "babel" });
|
|
319
|
+
* }
|
|
320
|
+
* return null; // Keep original for other languages
|
|
321
|
+
* },
|
|
322
|
+
* });
|
|
323
|
+
* ```
|
|
324
|
+
*/
|
|
325
|
+
declare function formatWithCodeFormatter(input: string, options?: FormatWithCodeFormatterOptions): Promise<FormatResult>;
|
|
255
326
|
//#endregion
|
|
256
|
-
export { type DashSetting, type FormatOptions, type FormatResult, type OrderedListPad, type Warning, format, formatWithWarnings };
|
|
327
|
+
export { type CodeFormatterCallback, type DashSetting, type FormatOptions, type FormatResult, type FormatWithCodeFormatterOptions, type OrderedListPad, type Warning, format, formatWithCodeFormatter, formatWithWarnings };
|
|
257
328
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;AAMA;AAQA;AAOA;;;AA4KW,KA3LC,cAAA,GA2LD,OAAA,GAAA,KAAA;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/index.ts"],"sourcesContent":[],"mappings":";;AAMA;AAQA;AAOA;;;AA4KW,KA3LC,cAAA,GA2LD,OAAA,GAAA,KAAA;;AAuBX;AAQA;AAyBA;AAeA;;KA1PY,WAAA;;ACsEZ;AA+BA;;;AAGG,UDjGc,aAAA,CCiGd;EAAO;AA8BV;;;EAGG,SAAA,CAAA,EAAA,MAAA;EAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mBD7CS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA+ER;;;;;;;WAQA;;;;;;;;;;;;;;;;;;;;;;KAuBC,qBAAA;;;;UAQK,8BAAA,SAAuC;;;;;;;;;;;;;;;;;;;kBAmBtC;;;;;UAMD,OAAA;;;;;;;;;;;;;UAeA,YAAA;;;;;;;;YASL;;;;;AC9JZ;;;;;AAiCA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAhEsB,MAAA,0BAEX,gBACR;;;;;;;;;;;;;;;;;;;;;;;;iBA4BmB,kBAAA,0BAEX,gBACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;iBA8BW,uBAAA,0BAEX,iCACR,QAAQ"}
|
package/dist/index.mjs
CHANGED
|
@@ -169,6 +169,31 @@ function format$1(input, options) {
|
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
/**
|
|
172
|
+
* Format Markdown with an optional code formatter callback.
|
|
173
|
+
*
|
|
174
|
+
* # Arguments
|
|
175
|
+
*
|
|
176
|
+
* * `input` - Markdown source to format
|
|
177
|
+
* * `options` - Optional formatting options as a JavaScript object
|
|
178
|
+
* * `code_formatter` - Optional JavaScript callback function `(language: string, code: string) => string | null`
|
|
179
|
+
* that formats code blocks. Return the formatted code, or null/undefined to keep the original.
|
|
180
|
+
*
|
|
181
|
+
* # Returns
|
|
182
|
+
*
|
|
183
|
+
* An object with `output` (formatted string) and `warnings` (array of warning objects).
|
|
184
|
+
* @param {string} input
|
|
185
|
+
* @param {any} options
|
|
186
|
+
* @param {Function | null} [code_formatter]
|
|
187
|
+
* @returns {any}
|
|
188
|
+
*/
|
|
189
|
+
function formatWithCodeFormatter$1(input, options, code_formatter) {
|
|
190
|
+
const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
191
|
+
const len0 = WASM_VECTOR_LEN;
|
|
192
|
+
const ret = wasm.formatWithCodeFormatter(ptr0, len0, options, isLikeNone(code_formatter) ? 0 : addToExternrefTable0(code_formatter));
|
|
193
|
+
if (ret[2]) throw takeFromExternrefTable0(ret[1]);
|
|
194
|
+
return takeFromExternrefTable0(ret[0]);
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
172
197
|
* Format Markdown and return both output and warnings.
|
|
173
198
|
*
|
|
174
199
|
* # Arguments
|
|
@@ -293,6 +318,11 @@ function __wbg_get_imports() {
|
|
|
293
318
|
return arg0.call(arg1);
|
|
294
319
|
}, arguments);
|
|
295
320
|
};
|
|
321
|
+
imports.wbg.__wbg_call_c8baa5c5e72d274e = function() {
|
|
322
|
+
return handleError(function(arg0, arg1, arg2, arg3) {
|
|
323
|
+
return arg0.call(arg1, arg2, arg3);
|
|
324
|
+
}, arguments);
|
|
325
|
+
};
|
|
296
326
|
imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {
|
|
297
327
|
return arg0.done;
|
|
298
328
|
};
|
|
@@ -502,7 +532,37 @@ async function formatWithWarnings(input, options = {}) {
|
|
|
502
532
|
await ensureInitialized();
|
|
503
533
|
return formatWithWarnings$1(input, options);
|
|
504
534
|
}
|
|
535
|
+
/**
|
|
536
|
+
* Format Markdown with an optional code formatter callback.
|
|
537
|
+
*
|
|
538
|
+
* This function allows you to provide a callback that formats code blocks
|
|
539
|
+
* using external formatters (e.g., Prettier, ESLint).
|
|
540
|
+
*
|
|
541
|
+
* @param input - Markdown source to format
|
|
542
|
+
* @param options - Formatting options with optional code formatter callback
|
|
543
|
+
* @returns Object with formatted output and any warnings
|
|
544
|
+
*
|
|
545
|
+
* @example
|
|
546
|
+
* ```typescript
|
|
547
|
+
* import { formatWithCodeFormatter } from "@hongdown/wasm";
|
|
548
|
+
* import * as prettier from "prettier";
|
|
549
|
+
*
|
|
550
|
+
* const { output, warnings } = await formatWithCodeFormatter(markdown, {
|
|
551
|
+
* codeFormatter: (language, code) => {
|
|
552
|
+
* if (language === "javascript" || language === "typescript") {
|
|
553
|
+
* return prettier.format(code, { parser: "babel" });
|
|
554
|
+
* }
|
|
555
|
+
* return null; // Keep original for other languages
|
|
556
|
+
* },
|
|
557
|
+
* });
|
|
558
|
+
* ```
|
|
559
|
+
*/
|
|
560
|
+
async function formatWithCodeFormatter(input, options = {}) {
|
|
561
|
+
await ensureInitialized();
|
|
562
|
+
const { codeFormatter, ...restOptions } = options;
|
|
563
|
+
return formatWithCodeFormatter$1(input, restOptions, codeFormatter ?? null);
|
|
564
|
+
}
|
|
505
565
|
|
|
506
566
|
//#endregion
|
|
507
|
-
export { format, formatWithWarnings };
|
|
567
|
+
export { format, formatWithCodeFormatter, formatWithWarnings };
|
|
508
568
|
//# sourceMappingURL=index.mjs.map
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["ptr","format","formatWithWarnings","init","wasmFormat","wasmFormatWithWarnings"],"sources":["../pkg/hongdown.js","../src/index.ts"],"sourcesContent":["let wasm;\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_externrefs.set(idx, obj);\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_externrefs.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\n/**\n * Format Markdown according to Hong Minhee's style conventions.\n *\n * # Arguments\n *\n * * `input` - Markdown source to format\n * * `options` - Optional formatting options as a JavaScript object\n *\n * # Returns\n *\n * The formatted Markdown string.\n * @param {string} input\n * @param {any} options\n * @returns {string}\n */\nexport function format(input, options) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.format(ptr0, len0, options);\n var ptr2 = ret[0];\n var len2 = ret[1];\n if (ret[3]) {\n ptr2 = 0; len2 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n}\n\n/**\n * Format Markdown and return both output and warnings.\n *\n * # Arguments\n *\n * * `input` - Markdown source to format\n * * `options` - Optional formatting options as a JavaScript object\n *\n * # Returns\n *\n * An object with `output` (formatted string) and `warnings` (array of warning objects).\n * @param {string} input\n * @param {any} options\n * @returns {any}\n */\nexport function formatWithWarnings(input, options) {\n const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.formatWithWarnings(ptr0, len0, options);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\nconst EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n } catch (e) {\n const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);\n\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {\n const ret = Error(getStringFromWasm0(arg0, arg1));\n return ret;\n };\n imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {\n const ret = Number(arg0);\n return ret;\n };\n imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {\n const ret = String(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {\n const v = arg1;\n const ret = typeof(v) === 'bigint' ? v : undefined;\n getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {\n const v = arg0;\n const ret = typeof(v) === 'boolean' ? v : undefined;\n return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n };\n imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {\n const ret = arg0 in arg1;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {\n const ret = typeof(arg0) === 'bigint';\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {\n const ret = typeof(arg0) === 'function';\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {\n const ret = arg0 === null;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {\n const val = arg0;\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {\n const ret = arg0 === undefined;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {\n const ret = arg0 === arg1;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {\n const ret = arg0 == arg1;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {\n const ret = arg0.call(arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {\n const ret = arg0.done;\n return ret;\n };\n imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {\n const ret = Object.entries(arg0);\n return ret;\n };\n imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n };\n imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(arg0, arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {\n const ret = arg0[arg1];\n return ret;\n };\n imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof ArrayBuffer;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Map;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Uint8Array;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {\n const ret = Array.isArray(arg0);\n return ret;\n };\n imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {\n const ret = Number.isSafeInteger(arg0);\n return ret;\n };\n imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {\n const ret = Symbol.iterator;\n return ret;\n };\n imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_new_1ba21ce319a06297 = function() {\n const ret = new Object();\n return ret;\n };\n imports.wbg.__wbg_new_25f239778d6112b9 = function() {\n const ret = new Array();\n return ret;\n };\n imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {\n const ret = new Uint8Array(arg0);\n return ret;\n };\n imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {\n const ret = arg0.next;\n return ret;\n };\n imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {\n const ret = arg0.next();\n return ret;\n }, arguments) };\n imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);\n };\n imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {\n arg0[arg1] = arg2;\n };\n imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {\n arg0[arg1 >>> 0] = arg2;\n };\n imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {\n const ret = arg0.value;\n return ret;\n };\n imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {\n // Cast intrinsic for `U64 -> Externref`.\n const ret = BigInt.asUintN(64, arg0);\n return ret;\n };\n imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {\n // Cast intrinsic for `I64 -> Externref`.\n const ret = arg0;\n return ret;\n };\n imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {\n // Cast intrinsic for `F64 -> Externref`.\n const ret = arg0;\n return ret;\n };\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_externrefs;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n };\n\n return imports;\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('hongdown_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n","/**\n * Hongdown WASM Library\n *\n * A Markdown formatter that enforces Hong Minhee's Markdown style conventions.\n *\n * @example\n * ```typescript\n * import { format } from \"@hongdown/wasm\";\n *\n * const markdown = \"# Hello\\nWorld\";\n * const formatted = await format(markdown);\n * ```\n *\n * @packageDocumentation\n */\n\nimport type { FormatOptions, FormatResult } from \"./types.js\";\n// @ts-expect-error: Subpath import resolved by Node.js/bundler\nimport { loadWasmBuffer } from \"#wasm-loader\";\nimport init, { format as wasmFormat, formatWithWarnings as wasmFormatWithWarnings } from \"../pkg/hongdown.js\";\n\n// Lazily initialized\nlet initialized = false;\nlet initPromise: Promise<void> | null = null;\n\n/**\n * Ensure the WASM module is initialized.\n * @internal\n */\nasync function ensureInitialized(): Promise<void> {\n if (initialized) {\n return;\n }\n\n if (!initPromise) {\n initPromise = (async () => {\n const buffer = await loadWasmBuffer();\n await init({ module_or_path: buffer });\n initialized = true;\n })();\n }\n\n await initPromise;\n}\n\n/**\n * Format Markdown according to Hong Minhee's style conventions.\n *\n * This function supports formatting directives embedded in HTML comments:\n *\n * - `<!-- hongdown-disable-file -->` - Disable formatting for the entire file.\n * - `<!-- hongdown-disable-next-line -->` - Disable formatting for the next block.\n * - `<!-- hongdown-disable-next-section -->` - Disable formatting until the next\n * section heading.\n * - `<!-- hongdown-disable -->` - Disable formatting from this point.\n * - `<!-- hongdown-enable -->` - Re-enable formatting.\n *\n * @param input - Markdown source to format\n * @param options - Formatting options (all optional)\n * @returns The formatted Markdown string\n *\n * @example\n * ```typescript\n * import { format } from \"@hongdown/wasm\";\n *\n * // Basic usage\n * const result = await format(\"# Hello\\nWorld\");\n *\n * // With options\n * const result = await format(markdown, {\n * lineWidth: 100,\n * setextH1: false,\n * fenceChar: \"`\",\n * });\n * ```\n */\nexport async function format(\n input: string,\n options: FormatOptions = {},\n): Promise<string> {\n await ensureInitialized();\n return wasmFormat(input, options);\n}\n\n/**\n * Format Markdown and return both output and warnings.\n *\n * This is similar to {@link format}, but also returns any warnings generated\n * during formatting (e.g., inconsistent table column counts).\n *\n * @param input - Markdown source to format\n * @param options - Formatting options (all optional)\n * @returns Object with formatted output and any warnings\n *\n * @example\n * ```typescript\n * import { formatWithWarnings } from \"@hongdown/wasm\";\n *\n * const { output, warnings } = await formatWithWarnings(markdown);\n *\n * if (warnings.length > 0) {\n * for (const warning of warnings) {\n * console.warn(`Line ${warning.line}: ${warning.message}`);\n * }\n * }\n * ```\n */\nexport async function formatWithWarnings(\n input: string,\n options: FormatOptions = {},\n): Promise<FormatResult> {\n await ensureInitialized();\n return wasmFormatWithWarnings(input, options) as FormatResult;\n}\n\n// Re-export types\nexport type {\n FormatOptions,\n FormatResult,\n Warning,\n OrderedListPad,\n DashSetting,\n} from \"./types.js\";\n"],"mappings":";;;AAAA,IAAI;AAEJ,SAAS,qBAAqB,KAAK;CAC/B,MAAM,MAAM,KAAK,yBAAyB;AAC1C,MAAK,sBAAsB,IAAI,KAAK,IAAI;AACxC,QAAO;;AAGX,SAAS,YAAY,KAAK;CAEtB,MAAM,OAAO,OAAO;AACpB,KAAI,QAAQ,YAAY,QAAQ,aAAa,OAAO,KAChD,QAAQ,GAAG;AAEf,KAAI,QAAQ,SACR,QAAO,IAAI,IAAI;AAEnB,KAAI,QAAQ,UAAU;EAClB,MAAM,cAAc,IAAI;AACxB,MAAI,eAAe,KACf,QAAO;MAEP,QAAO,UAAU,YAAY;;AAGrC,KAAI,QAAQ,YAAY;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,OAAO,QAAQ,YAA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E,gBADE,MAAM,gBAAgB,EACA,CAAC;AACtC,gBAAc;KACZ;AAGN,OAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCR,eAAsB,OACpB,OACA,UAAyB,EAAE,EACV;AACjB,OAAM,mBAAmB;AACzB,QAAOC,SAAW,OAAO,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;AA0BnC,eAAsB,mBACpB,OACA,UAAyB,EAAE,EACJ;AACvB,OAAM,mBAAmB;AACzB,QAAOC,qBAAuB,OAAO,QAAQ"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["ptr","format","formatWithCodeFormatter","formatWithWarnings","init","wasmFormat","wasmFormatWithWarnings","wasmFormatWithCodeFormatter"],"sources":["../pkg/hongdown.js","../src/index.ts"],"sourcesContent":["let wasm;\n\nfunction addToExternrefTable0(obj) {\n const idx = wasm.__externref_table_alloc();\n wasm.__wbindgen_externrefs.set(idx, obj);\n return idx;\n}\n\nfunction debugString(val) {\n // primitive types\n const type = typeof val;\n if (type == 'number' || type == 'boolean' || val == null) {\n return `${val}`;\n }\n if (type == 'string') {\n return `\"${val}\"`;\n }\n if (type == 'symbol') {\n const description = val.description;\n if (description == null) {\n return 'Symbol';\n } else {\n return `Symbol(${description})`;\n }\n }\n if (type == 'function') {\n const name = val.name;\n if (typeof name == 'string' && name.length > 0) {\n return `Function(${name})`;\n } else {\n return 'Function';\n }\n }\n // objects\n if (Array.isArray(val)) {\n const length = val.length;\n let debug = '[';\n if (length > 0) {\n debug += debugString(val[0]);\n }\n for(let i = 1; i < length; i++) {\n debug += ', ' + debugString(val[i]);\n }\n debug += ']';\n return debug;\n }\n // Test for built-in\n const builtInMatches = /\\[object ([^\\]]+)\\]/.exec(toString.call(val));\n let className;\n if (builtInMatches && builtInMatches.length > 1) {\n className = builtInMatches[1];\n } else {\n // Failed to match the standard '[object ClassName]'\n return toString.call(val);\n }\n if (className == 'Object') {\n // we're a user defined class or Object\n // JSON.stringify avoids problems with cycles, and is generally much\n // easier than looping through ownProperties of `val`.\n try {\n return 'Object(' + JSON.stringify(val) + ')';\n } catch (_) {\n return 'Object';\n }\n }\n // errors\n if (val instanceof Error) {\n return `${val.name}: ${val.message}\\n${val.stack}`;\n }\n // TODO we could test for more things here, like `Set`s and `Map`s.\n return className;\n}\n\nfunction getArrayU8FromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return getUint8ArrayMemory0().subarray(ptr / 1, ptr / 1 + len);\n}\n\nlet cachedDataViewMemory0 = null;\nfunction getDataViewMemory0() {\n if (cachedDataViewMemory0 === null || cachedDataViewMemory0.buffer.detached === true || (cachedDataViewMemory0.buffer.detached === undefined && cachedDataViewMemory0.buffer !== wasm.memory.buffer)) {\n cachedDataViewMemory0 = new DataView(wasm.memory.buffer);\n }\n return cachedDataViewMemory0;\n}\n\nfunction getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return decodeText(ptr, len);\n}\n\nlet cachedUint8ArrayMemory0 = null;\nfunction getUint8ArrayMemory0() {\n if (cachedUint8ArrayMemory0 === null || cachedUint8ArrayMemory0.byteLength === 0) {\n cachedUint8ArrayMemory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8ArrayMemory0;\n}\n\nfunction handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n const idx = addToExternrefTable0(e);\n wasm.__wbindgen_exn_store(idx);\n }\n}\n\nfunction isLikeNone(x) {\n return x === undefined || x === null;\n}\n\nfunction passStringToWasm0(arg, malloc, realloc) {\n if (realloc === undefined) {\n const buf = cachedTextEncoder.encode(arg);\n const ptr = malloc(buf.length, 1) >>> 0;\n getUint8ArrayMemory0().subarray(ptr, ptr + buf.length).set(buf);\n WASM_VECTOR_LEN = buf.length;\n return ptr;\n }\n\n let len = arg.length;\n let ptr = malloc(len, 1) >>> 0;\n\n const mem = getUint8ArrayMemory0();\n\n let offset = 0;\n\n for (; offset < len; offset++) {\n const code = arg.charCodeAt(offset);\n if (code > 0x7F) break;\n mem[ptr + offset] = code;\n }\n if (offset !== len) {\n if (offset !== 0) {\n arg = arg.slice(offset);\n }\n ptr = realloc(ptr, len, len = offset + arg.length * 3, 1) >>> 0;\n const view = getUint8ArrayMemory0().subarray(ptr + offset, ptr + len);\n const ret = cachedTextEncoder.encodeInto(arg, view);\n\n offset += ret.written;\n ptr = realloc(ptr, len, offset, 1) >>> 0;\n }\n\n WASM_VECTOR_LEN = offset;\n return ptr;\n}\n\nfunction takeFromExternrefTable0(idx) {\n const value = wasm.__wbindgen_externrefs.get(idx);\n wasm.__externref_table_dealloc(idx);\n return value;\n}\n\nlet cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\ncachedTextDecoder.decode();\nconst MAX_SAFARI_DECODE_BYTES = 2146435072;\nlet numBytesDecoded = 0;\nfunction decodeText(ptr, len) {\n numBytesDecoded += len;\n if (numBytesDecoded >= MAX_SAFARI_DECODE_BYTES) {\n cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });\n cachedTextDecoder.decode();\n numBytesDecoded = len;\n }\n return cachedTextDecoder.decode(getUint8ArrayMemory0().subarray(ptr, ptr + len));\n}\n\nconst cachedTextEncoder = new TextEncoder();\n\nif (!('encodeInto' in cachedTextEncoder)) {\n cachedTextEncoder.encodeInto = function (arg, view) {\n const buf = cachedTextEncoder.encode(arg);\n view.set(buf);\n return {\n read: arg.length,\n written: buf.length\n };\n }\n}\n\nlet WASM_VECTOR_LEN = 0;\n\n/**\n * Format Markdown according to Hong Minhee's style conventions.\n *\n * # Arguments\n *\n * * `input` - Markdown source to format\n * * `options` - Optional formatting options as a JavaScript object\n *\n * # Returns\n *\n * The formatted Markdown string.\n * @param {string} input\n * @param {any} options\n * @returns {string}\n */\nexport function format(input, options) {\n let deferred3_0;\n let deferred3_1;\n try {\n const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.format(ptr0, len0, options);\n var ptr2 = ret[0];\n var len2 = ret[1];\n if (ret[3]) {\n ptr2 = 0; len2 = 0;\n throw takeFromExternrefTable0(ret[2]);\n }\n deferred3_0 = ptr2;\n deferred3_1 = len2;\n return getStringFromWasm0(ptr2, len2);\n } finally {\n wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);\n }\n}\n\n/**\n * Format Markdown with an optional code formatter callback.\n *\n * # Arguments\n *\n * * `input` - Markdown source to format\n * * `options` - Optional formatting options as a JavaScript object\n * * `code_formatter` - Optional JavaScript callback function `(language: string, code: string) => string | null`\n * that formats code blocks. Return the formatted code, or null/undefined to keep the original.\n *\n * # Returns\n *\n * An object with `output` (formatted string) and `warnings` (array of warning objects).\n * @param {string} input\n * @param {any} options\n * @param {Function | null} [code_formatter]\n * @returns {any}\n */\nexport function formatWithCodeFormatter(input, options, code_formatter) {\n const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.formatWithCodeFormatter(ptr0, len0, options, isLikeNone(code_formatter) ? 0 : addToExternrefTable0(code_formatter));\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\n/**\n * Format Markdown and return both output and warnings.\n *\n * # Arguments\n *\n * * `input` - Markdown source to format\n * * `options` - Optional formatting options as a JavaScript object\n *\n * # Returns\n *\n * An object with `output` (formatted string) and `warnings` (array of warning objects).\n * @param {string} input\n * @param {any} options\n * @returns {any}\n */\nexport function formatWithWarnings(input, options) {\n const ptr0 = passStringToWasm0(input, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.formatWithWarnings(ptr0, len0, options);\n if (ret[2]) {\n throw takeFromExternrefTable0(ret[1]);\n }\n return takeFromExternrefTable0(ret[0]);\n}\n\nconst EXPECTED_RESPONSE_TYPES = new Set(['basic', 'cors', 'default']);\n\nasync function __wbg_load(module, imports) {\n if (typeof Response === 'function' && module instanceof Response) {\n if (typeof WebAssembly.instantiateStreaming === 'function') {\n try {\n return await WebAssembly.instantiateStreaming(module, imports);\n } catch (e) {\n const validResponse = module.ok && EXPECTED_RESPONSE_TYPES.has(module.type);\n\n if (validResponse && module.headers.get('Content-Type') !== 'application/wasm') {\n console.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\n } else {\n throw e;\n }\n }\n }\n\n const bytes = await module.arrayBuffer();\n return await WebAssembly.instantiate(bytes, imports);\n } else {\n const instance = await WebAssembly.instantiate(module, imports);\n\n if (instance instanceof WebAssembly.Instance) {\n return { instance, module };\n } else {\n return instance;\n }\n }\n}\n\nfunction __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbg_Error_52673b7de5a0ca89 = function(arg0, arg1) {\n const ret = Error(getStringFromWasm0(arg0, arg1));\n return ret;\n };\n imports.wbg.__wbg_Number_2d1dcfcf4ec51736 = function(arg0) {\n const ret = Number(arg0);\n return ret;\n };\n imports.wbg.__wbg_String_8f0eb39a4a4c2f66 = function(arg0, arg1) {\n const ret = String(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_bigint_get_as_i64_6e32f5e6aff02e1d = function(arg0, arg1) {\n const v = arg1;\n const ret = typeof(v) === 'bigint' ? v : undefined;\n getDataViewMemory0().setBigInt64(arg0 + 8 * 1, isLikeNone(ret) ? BigInt(0) : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbg___wbindgen_boolean_get_dea25b33882b895b = function(arg0) {\n const v = arg0;\n const ret = typeof(v) === 'boolean' ? v : undefined;\n return isLikeNone(ret) ? 0xFFFFFF : ret ? 1 : 0;\n };\n imports.wbg.__wbg___wbindgen_debug_string_adfb662ae34724b6 = function(arg0, arg1) {\n const ret = debugString(arg1);\n const ptr1 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n const len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_in_0d3e1e8f0c669317 = function(arg0, arg1) {\n const ret = arg0 in arg1;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_bigint_0e1a2e3f55cfae27 = function(arg0) {\n const ret = typeof(arg0) === 'bigint';\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_function_8d400b8b1af978cd = function(arg0) {\n const ret = typeof(arg0) === 'function';\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_null_dfda7d66506c95b5 = function(arg0) {\n const ret = arg0 === null;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_object_ce774f3490692386 = function(arg0) {\n const val = arg0;\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_is_undefined_f6b95eab589e0269 = function(arg0) {\n const ret = arg0 === undefined;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_jsval_eq_b6101cc9cef1fe36 = function(arg0, arg1) {\n const ret = arg0 === arg1;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_jsval_loose_eq_766057600fdd1b0d = function(arg0, arg1) {\n const ret = arg0 == arg1;\n return ret;\n };\n imports.wbg.__wbg___wbindgen_number_get_9619185a74197f95 = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'number' ? obj : undefined;\n getDataViewMemory0().setFloat64(arg0 + 8 * 1, isLikeNone(ret) ? 0 : ret, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, !isLikeNone(ret), true);\n };\n imports.wbg.__wbg___wbindgen_string_get_a2a31e16edf96e42 = function(arg0, arg1) {\n const obj = arg1;\n const ret = typeof(obj) === 'string' ? obj : undefined;\n var ptr1 = isLikeNone(ret) ? 0 : passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);\n var len1 = WASM_VECTOR_LEN;\n getDataViewMemory0().setInt32(arg0 + 4 * 1, len1, true);\n getDataViewMemory0().setInt32(arg0 + 4 * 0, ptr1, true);\n };\n imports.wbg.__wbg___wbindgen_throw_dd24417ed36fc46e = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n imports.wbg.__wbg_call_abb4ff46ce38be40 = function() { return handleError(function (arg0, arg1) {\n const ret = arg0.call(arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_call_c8baa5c5e72d274e = function() { return handleError(function (arg0, arg1, arg2, arg3) {\n const ret = arg0.call(arg1, arg2, arg3);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_done_62ea16af4ce34b24 = function(arg0) {\n const ret = arg0.done;\n return ret;\n };\n imports.wbg.__wbg_entries_83c79938054e065f = function(arg0) {\n const ret = Object.entries(arg0);\n return ret;\n };\n imports.wbg.__wbg_get_6b7bd52aca3f9671 = function(arg0, arg1) {\n const ret = arg0[arg1 >>> 0];\n return ret;\n };\n imports.wbg.__wbg_get_af9dab7e9603ea93 = function() { return handleError(function (arg0, arg1) {\n const ret = Reflect.get(arg0, arg1);\n return ret;\n }, arguments) };\n imports.wbg.__wbg_get_with_ref_key_1dc361bd10053bfe = function(arg0, arg1) {\n const ret = arg0[arg1];\n return ret;\n };\n imports.wbg.__wbg_instanceof_ArrayBuffer_f3320d2419cd0355 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof ArrayBuffer;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Map_084be8da74364158 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Map;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_instanceof_Uint8Array_da54ccc9d3e09434 = function(arg0) {\n let result;\n try {\n result = arg0 instanceof Uint8Array;\n } catch (_) {\n result = false;\n }\n const ret = result;\n return ret;\n };\n imports.wbg.__wbg_isArray_51fd9e6422c0a395 = function(arg0) {\n const ret = Array.isArray(arg0);\n return ret;\n };\n imports.wbg.__wbg_isSafeInteger_ae7d3f054d55fa16 = function(arg0) {\n const ret = Number.isSafeInteger(arg0);\n return ret;\n };\n imports.wbg.__wbg_iterator_27b7c8b35ab3e86b = function() {\n const ret = Symbol.iterator;\n return ret;\n };\n imports.wbg.__wbg_length_22ac23eaec9d8053 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_length_d45040a40c570362 = function(arg0) {\n const ret = arg0.length;\n return ret;\n };\n imports.wbg.__wbg_new_1ba21ce319a06297 = function() {\n const ret = new Object();\n return ret;\n };\n imports.wbg.__wbg_new_25f239778d6112b9 = function() {\n const ret = new Array();\n return ret;\n };\n imports.wbg.__wbg_new_6421f6084cc5bc5a = function(arg0) {\n const ret = new Uint8Array(arg0);\n return ret;\n };\n imports.wbg.__wbg_next_138a17bbf04e926c = function(arg0) {\n const ret = arg0.next;\n return ret;\n };\n imports.wbg.__wbg_next_3cfe5c0fe2a4cc53 = function() { return handleError(function (arg0) {\n const ret = arg0.next();\n return ret;\n }, arguments) };\n imports.wbg.__wbg_prototypesetcall_dfe9b766cdc1f1fd = function(arg0, arg1, arg2) {\n Uint8Array.prototype.set.call(getArrayU8FromWasm0(arg0, arg1), arg2);\n };\n imports.wbg.__wbg_set_3f1d0b984ed272ed = function(arg0, arg1, arg2) {\n arg0[arg1] = arg2;\n };\n imports.wbg.__wbg_set_7df433eea03a5c14 = function(arg0, arg1, arg2) {\n arg0[arg1 >>> 0] = arg2;\n };\n imports.wbg.__wbg_value_57b7b035e117f7ee = function(arg0) {\n const ret = arg0.value;\n return ret;\n };\n imports.wbg.__wbindgen_cast_2241b6af4c4b2941 = function(arg0, arg1) {\n // Cast intrinsic for `Ref(String) -> Externref`.\n const ret = getStringFromWasm0(arg0, arg1);\n return ret;\n };\n imports.wbg.__wbindgen_cast_4625c577ab2ec9ee = function(arg0) {\n // Cast intrinsic for `U64 -> Externref`.\n const ret = BigInt.asUintN(64, arg0);\n return ret;\n };\n imports.wbg.__wbindgen_cast_9ae0607507abb057 = function(arg0) {\n // Cast intrinsic for `I64 -> Externref`.\n const ret = arg0;\n return ret;\n };\n imports.wbg.__wbindgen_cast_d6cd19b81560fd6e = function(arg0) {\n // Cast intrinsic for `F64 -> Externref`.\n const ret = arg0;\n return ret;\n };\n imports.wbg.__wbindgen_init_externref_table = function() {\n const table = wasm.__wbindgen_externrefs;\n const offset = table.grow(4);\n table.set(0, undefined);\n table.set(offset + 0, undefined);\n table.set(offset + 1, null);\n table.set(offset + 2, true);\n table.set(offset + 3, false);\n };\n\n return imports;\n}\n\nfunction __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n __wbg_init.__wbindgen_wasm_module = module;\n cachedDataViewMemory0 = null;\n cachedUint8ArrayMemory0 = null;\n\n\n wasm.__wbindgen_start();\n return wasm;\n}\n\nfunction initSync(module) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module !== 'undefined') {\n if (Object.getPrototypeOf(module) === Object.prototype) {\n ({module} = module)\n } else {\n console.warn('using deprecated parameters for `initSync()`; pass a single object instead')\n }\n }\n\n const imports = __wbg_get_imports();\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n const instance = new WebAssembly.Instance(module, imports);\n return __wbg_finalize_init(instance, module);\n}\n\nasync function __wbg_init(module_or_path) {\n if (wasm !== undefined) return wasm;\n\n\n if (typeof module_or_path !== 'undefined') {\n if (Object.getPrototypeOf(module_or_path) === Object.prototype) {\n ({module_or_path} = module_or_path)\n } else {\n console.warn('using deprecated parameters for the initialization function; pass a single object instead')\n }\n }\n\n if (typeof module_or_path === 'undefined') {\n module_or_path = new URL('hongdown_bg.wasm', import.meta.url);\n }\n const imports = __wbg_get_imports();\n\n if (typeof module_or_path === 'string' || (typeof Request === 'function' && module_or_path instanceof Request) || (typeof URL === 'function' && module_or_path instanceof URL)) {\n module_or_path = fetch(module_or_path);\n }\n\n const { instance, module } = await __wbg_load(await module_or_path, imports);\n\n return __wbg_finalize_init(instance, module);\n}\n\nexport { initSync };\nexport default __wbg_init;\n","/**\n * Hongdown WASM Library\n *\n * A Markdown formatter that enforces Hong Minhee's Markdown style conventions.\n *\n * @example\n * ```typescript\n * import { format } from \"@hongdown/wasm\";\n *\n * const markdown = \"# Hello\\nWorld\";\n * const formatted = await format(markdown);\n * ```\n *\n * @packageDocumentation\n */\n\nimport type {\n FormatOptions,\n FormatResult,\n FormatWithCodeFormatterOptions,\n} from \"./types.js\";\n// @ts-expect-error: Subpath import resolved by Node.js/bundler\nimport { loadWasmBuffer } from \"#wasm-loader\";\nimport init, {\n format as wasmFormat,\n formatWithWarnings as wasmFormatWithWarnings,\n formatWithCodeFormatter as wasmFormatWithCodeFormatter,\n} from \"../pkg/hongdown.js\";\n\n// Lazily initialized\nlet initialized = false;\nlet initPromise: Promise<void> | null = null;\n\n/**\n * Ensure the WASM module is initialized.\n * @internal\n */\nasync function ensureInitialized(): Promise<void> {\n if (initialized) {\n return;\n }\n\n if (!initPromise) {\n initPromise = (async () => {\n const buffer = await loadWasmBuffer();\n await init({ module_or_path: buffer });\n initialized = true;\n })();\n }\n\n await initPromise;\n}\n\n/**\n * Format Markdown according to Hong Minhee's style conventions.\n *\n * This function supports formatting directives embedded in HTML comments:\n *\n * - `<!-- hongdown-disable-file -->` - Disable formatting for the entire file.\n * - `<!-- hongdown-disable-next-line -->` - Disable formatting for the next block.\n * - `<!-- hongdown-disable-next-section -->` - Disable formatting until the next\n * section heading.\n * - `<!-- hongdown-disable -->` - Disable formatting from this point.\n * - `<!-- hongdown-enable -->` - Re-enable formatting.\n *\n * @param input - Markdown source to format\n * @param options - Formatting options (all optional)\n * @returns The formatted Markdown string\n *\n * @example\n * ```typescript\n * import { format } from \"@hongdown/wasm\";\n *\n * // Basic usage\n * const result = await format(\"# Hello\\nWorld\");\n *\n * // With options\n * const result = await format(markdown, {\n * lineWidth: 100,\n * setextH1: false,\n * fenceChar: \"`\",\n * });\n * ```\n */\nexport async function format(\n input: string,\n options: FormatOptions = {},\n): Promise<string> {\n await ensureInitialized();\n return wasmFormat(input, options);\n}\n\n/**\n * Format Markdown and return both output and warnings.\n *\n * This is similar to {@link format}, but also returns any warnings generated\n * during formatting (e.g., inconsistent table column counts).\n *\n * @param input - Markdown source to format\n * @param options - Formatting options (all optional)\n * @returns Object with formatted output and any warnings\n *\n * @example\n * ```typescript\n * import { formatWithWarnings } from \"@hongdown/wasm\";\n *\n * const { output, warnings } = await formatWithWarnings(markdown);\n *\n * if (warnings.length > 0) {\n * for (const warning of warnings) {\n * console.warn(`Line ${warning.line}: ${warning.message}`);\n * }\n * }\n * ```\n */\nexport async function formatWithWarnings(\n input: string,\n options: FormatOptions = {},\n): Promise<FormatResult> {\n await ensureInitialized();\n return wasmFormatWithWarnings(input, options) as FormatResult;\n}\n\n/**\n * Format Markdown with an optional code formatter callback.\n *\n * This function allows you to provide a callback that formats code blocks\n * using external formatters (e.g., Prettier, ESLint).\n *\n * @param input - Markdown source to format\n * @param options - Formatting options with optional code formatter callback\n * @returns Object with formatted output and any warnings\n *\n * @example\n * ```typescript\n * import { formatWithCodeFormatter } from \"@hongdown/wasm\";\n * import * as prettier from \"prettier\";\n *\n * const { output, warnings } = await formatWithCodeFormatter(markdown, {\n * codeFormatter: (language, code) => {\n * if (language === \"javascript\" || language === \"typescript\") {\n * return prettier.format(code, { parser: \"babel\" });\n * }\n * return null; // Keep original for other languages\n * },\n * });\n * ```\n */\nexport async function formatWithCodeFormatter(\n input: string,\n options: FormatWithCodeFormatterOptions = {},\n): Promise<FormatResult> {\n await ensureInitialized();\n const { codeFormatter, ...restOptions } = options;\n return wasmFormatWithCodeFormatter(\n input,\n restOptions,\n codeFormatter ?? null,\n ) as FormatResult;\n}\n\n// Re-export types\nexport type {\n CodeFormatterCallback,\n FormatOptions,\n FormatResult,\n FormatWithCodeFormatterOptions,\n Warning,\n OrderedListPad,\n DashSetting,\n} from \"./types.js\";\n"],"mappings":";;;AAAA,IAAI;AAEJ,SAAS,qBAAqB,KAAK;CAC/B,MAAM,MAAM,KAAK,yBAAyB;AAC1C,MAAK,sBAAsB,IAAI,KAAK,IAAI;AACxC,QAAO;;AAGX,SAAS,YAAY,KAAK;CAEtB,MAAM,OAAO,OAAO;AACpB,KAAI,QAAQ,YAAY,QAAQ,aAAa,OAAO,KAChD,QAAQ,GAAG;AAEf,KAAI,QAAQ,SACR,QAAO,IAAI,IAAI;AAEnB,KAAI,QAAQ,UAAU;EAClB,MAAM,cAAc,IAAI;AACxB,MAAI,eAAe,KACf,QAAO;MAEP,QAAO,UAAU,YAAY;;AAGrC,KAAI,QAAQ,YAAY;EACpB,MAAM,OAAO,IAAI;AACjB,MAAI,OAAO,QAAQ,YAAY,KAAK,SAAS,EACzC,QAAO,YAAY,KAAK;MAExB,QAAO;;AAIf,KAAI,MAAM,QAAQ,IAAI,EAAE;EACpB,MAAM,SAAS,IAAI;EACnB,IAAI,QAAQ;AACZ,MAAI,SAAS,EACT,UAAS,YAAY,IAAI,GAAG;AAEhC,OAAI,IAAI,IAAI,GAAG,IAAI,QAAQ,IACvB,UAAS,OAAO,YAAY,IAAI,GAAG;AAEvC,WAAS;AACT,SAAO;;CAGX,MAAM,iBAAiB,sBAAsB,KAAK,SAAS,KAAK,IAAI,CAAC;CACrE,IAAI;AACJ,KAAI,kBAAkB,eAAe,SAAS,EAC1C,aAAY,eAAe;KAG3B,QAAO,SAAS,KAAK,IAAI;AAE7B,KAAI,aAAa,SAIb,KAAI;AACA,SAAO,YAAY,KAAK,UAAU,IAAI,GAAG;UACpC,GAAG;AACR,SAAO;;AAIf,KAAI,eAAe,MACf,QAAO,GAAG,IAAI,KAA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