🎨 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219

This commit is contained in:
Liang Ding 2022-12-11 10:03:47 +08:00
parent 8400173cba
commit 2f9f9ec360
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
8 changed files with 34 additions and 3 deletions

View file

@ -79,6 +79,11 @@ func loadTreeNodes(box string, p string, level int) (ret []*ast.Node, err error)
heading.AppendChild(&ast.Node{Type: ast.NodeText, Tokens: []byte(tree.Root.IALAttr("title"))})
tree.Root.PrependChild(heading)
for c := tree.Root.FirstChild; nil != c; c = c.Next {
if ast.NodeParagraph == c.Type && nil == c.FirstChild {
// 剔除空段落
continue
}
ret = append(ret, c)
}
return