mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🐛 导出 PDF 插入文档标题转义问题
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user