FIX: markdown-it parse fn requires an env arg with {} as default (#17900)

See https://markdown-it.github.io/markdown-it/#MarkdownIt.parse for more details
This commit is contained in:
Joffrey JAFFEUX 2022-08-13 15:56:41 +02:00 committed by GitHub
parent 7476c22324
commit ccd76ec48d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,9 +68,9 @@ export function sanitizeAsync(text, options) {
});
}
export function parseAsync(md, options) {
export function parseAsync(md, options = {}, env = {}) {
return loadMarkdownIt().then(() => {
return createPrettyText(options).opts.engine.parse(md);
return createPrettyText(options).opts.engine.parse(md, env);
});
}