🎨 导出 PDF/HTML 时遵循是否显示书签、命名等设置 Fix https://github.com/siyuan-note/siyuan/issues/6333

This commit is contained in:
Liang Ding 2022-10-24 23:24:13 +08:00
parent 1c03d11f2b
commit 1f03ae95bd
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -1208,7 +1208,7 @@ func exportTree(tree *parse.Tree, wysiwyg, expandKaTexMacros, keepFold bool) (re
if Conf.Export.AddTitle {
if root, _ := getBlock(id); nil != root {
title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1}
title := &ast.Node{Type: ast.NodeHeading, HeadingLevel: 1, KramdownIAL: parse.Map2IAL(root.IAL)}
content := html.UnescapeString(root.Content)
title.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(content)})
ret.Root.PrependChild(title)