This commit is contained in:
Daniel 2024-12-11 00:11:12 +08:00
parent 7e21eb12e6
commit d562fdb68d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -67,7 +67,7 @@ func HTML2Markdown(htmlStr string, luteEngine *lute.Lute) (markdown string, with
}
func HTML2Tree(htmlStr string, luteEngine *lute.Lute) (tree *parse.Tree, withMath bool) {
htmlStr = util.RemoveInvalid(htmlStr)
htmlStr = gulu.Str.RemovePUA(htmlStr)
assetDirPath := filepath.Join(util.DataDir, "assets")
tree = luteEngine.HTML2Tree(htmlStr)
ast.Walk(tree.Root, func(n *ast.Node, entering bool) ast.WalkStatus {