fix: set htmlAst after walking tree in ofm (closes #589)

This commit is contained in:
Jacky Zhao 2023-11-14 20:01:48 -08:00
parent 76f2664277
commit 2de48b267a

View File

@ -436,7 +436,6 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
const blockTagTypes = new Set(["blockquote"]) const blockTagTypes = new Set(["blockquote"])
return (tree, file) => { return (tree, file) => {
file.data.blocks = {} file.data.blocks = {}
file.data.htmlAst = tree
visit(tree, "element", (node, index, parent) => { visit(tree, "element", (node, index, parent) => {
if (blockTagTypes.has(node.tagName)) { if (blockTagTypes.has(node.tagName)) {
@ -478,6 +477,8 @@ export const ObsidianFlavoredMarkdown: QuartzTransformerPlugin<Partial<Options>
} }
} }
}) })
file.data.htmlAst = tree
} }
}) })
} }