🐛 导出 PDF 插入文档标题转义问题
This commit is contained in:
parent
04d003c134
commit
7c5e3d042a
1 changed files with 2 additions and 1 deletions
|
@ -1288,7 +1288,8 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros bool) (ret *parse.T
|
|||
if Conf.Export.AddTitle {
|
||||
if root, _ := getBlock(id); nil != root {
|
||||
title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1}
|
||||
title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(root.Content)})
|
||||
content := html.UnescapeString(root.Content)
|
||||
title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})
|
||||
ret.Root.PrependChild(title)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue