mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 支持合并子文档导出 Word/PDF https://github.com/siyuan-note/siyuan/issues/3219
This commit is contained in:
@@ -33,6 +33,13 @@ func mergeSubDocs(rootTree *parse.Tree) (ret *parse.Tree, err error) {
|
||||
insertPoint = rootTree.Root
|
||||
}
|
||||
|
||||
// 跳过空段落插入点,向上寻找非空段落
|
||||
for ; nil != insertPoint && ast.NodeParagraph == insertPoint.Type; insertPoint = insertPoint.Previous {
|
||||
if nil != insertPoint.FirstChild {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
for {
|
||||
i := 0
|
||||
if err = walkBlock(insertPoint, rootBlock, i); nil != err {
|
||||
|
||||
Reference in New Issue
Block a user