mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
markup/goldmark: Sync image render hook code with Goldmark
Fixes #11681
This commit is contained in:
parent
0bde6931ac
commit
805cc1773b
1 changed files with 3 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue