mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Ignore the last empty paragraph block when exporting merged sub-documents https://github.com/siyuan-note/siyuan/issues/15028
This commit is contained in:
parent
31121977ec
commit
4f4efbdf10
1 changed files with 9 additions and 2 deletions
|
|
@ -76,8 +76,15 @@ func walkBlock(insertPoint *ast.Node, block *Block, level int) (err error) {
|
|||
return
|
||||
}
|
||||
|
||||
for j := len(nodes) - 1; -1 < j; j-- {
|
||||
insertPoint.InsertAfter(nodes[j])
|
||||
lastIndex := len(nodes) - 1
|
||||
for j := lastIndex; -1 < j; j-- {
|
||||
node := nodes[j]
|
||||
if j == lastIndex && ast.NodeParagraph == node.Type && nil == node.FirstChild {
|
||||
// 跳过最后一个空段落块
|
||||
// Ignore the last empty paragraph block when exporting merged sub-documents https://github.com/siyuan-note/siyuan/issues/15028
|
||||
continue
|
||||
}
|
||||
insertPoint.InsertAfter(node)
|
||||
}
|
||||
}
|
||||
block.Children = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue