浏览代码

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

Liang Ding 2 年之前
父节点
当前提交
1f03ae95bd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/model/export.go

+ 1 - 1
kernel/model/export.go

@@ -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)