mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 04:03:57 -06:00
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:
parent
7476c22324
commit
ccd76ec48d
@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user