mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-14 20:33:59 +02:00
committed by
Bjørn Erik Pedersen
parent
0efb00c2a8
commit
c5f2f5837f
@@ -79,9 +79,8 @@ func (t *tocTransformer) Transform(n *ast.Document, reader text.Reader, pc parse
|
||||
if found {
|
||||
header.ID = string(id.([]byte))
|
||||
}
|
||||
case ast.KindText:
|
||||
textNode := n.(*ast.Text)
|
||||
headingText.Write(textNode.Text(reader.Source()))
|
||||
case ast.KindText, ast.KindString:
|
||||
headingText.Write(n.Text(reader.Source()))
|
||||
}
|
||||
|
||||
return s, nil
|
||||
|
Reference in New Issue
Block a user