Bump goldmark to 1.7.8

This commit is contained in:
Manuel Rüger
2024-10-21 13:24:49 +02:00
parent 82aebec1eb
commit e7a3877ded
6 changed files with 13 additions and 11 deletions

View File

@@ -107,9 +107,9 @@ func nodeToHTMLText(n ast.Node, source []byte) []byte {
var buf bytes.Buffer
for c := n.FirstChild(); c != nil; c = c.NextSibling() {
if s, ok := c.(*ast.String); ok && s.IsCode() {
buf.Write(s.Text(source))
} else if !c.HasChildren() {
buf.Write(util.EscapeHTML(c.Text(source)))
buf.Write(s.Value)
} else if t, ok := c.(*ast.Text); ok {
buf.Write(util.EscapeHTML(t.Value(source)))
} else {
buf.Write(nodeToHTMLText(c, source))
}