mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-12 20:13:59 +02:00
markup/goldmark: Sync image render hook code with Goldmark
Fixes #11681
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
0bde6931ac
commit
805cc1773b
@@ -484,6 +484,9 @@ func nodeToHTMLText(n ast.Node, source []byte) []byte {
|
||||
buf.Write(s.Text(source))
|
||||
} else if !c.HasChildren() {
|
||||
buf.Write(util.EscapeHTML(c.Text(source)))
|
||||
if t, ok := c.(*ast.Text); ok && t.SoftLineBreak() {
|
||||
buf.WriteByte('\n')
|
||||
}
|
||||
} else {
|
||||
buf.Write(nodeToHTMLText(c, source))
|
||||
}
|
||||
|
Reference in New Issue
Block a user