This commit is contained in:
Liang Ding 2022-09-17 11:19:45 +08:00
parent cd1e638cca
commit 8ceac926e3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -114,10 +114,10 @@ func NestedInlines2FlattedSpans(tree *parse.Tree) {
}
if entering {
span = &ast.Node{Type: ast.NodeTextMark, TextMarkType: strings.Join(tags, " "), TextMarkTextContent: string(n.Tokens)}
span = &ast.Node{Type: ast.NodeTextMark, TextMarkType: strings.Join(tags, " "), TextMarkTextContent: string(html.EscapeHTML(n.Tokens))}
if ast.NodeInlineMathContent == n.Type {
span.TextMarkTextContent = ""
span.TextMarkInlineMathContent = string(n.Tokens)
span.TextMarkInlineMathContent = string(html.EscapeHTML(n.Tokens))
}
if ast.NodeLinkText == n.Type && !n.ParentIs(ast.NodeImage) {
var link *ast.Node