mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-29 11:46:09 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
c1c4972544
1 changed files with 11 additions and 3 deletions
|
|
@ -792,9 +792,17 @@ func (tx *Transaction) doDelete(operation *Operation) (ret *TxErr) {
|
|||
|
||||
node.Unlink()
|
||||
if nil != parent && ast.NodeListItem == parent.Type && nil == parent.FirstChild {
|
||||
// 保持空列表项
|
||||
node.FirstChild = nil
|
||||
parent.AppendChild(node)
|
||||
needAppendEmptyListItem := true
|
||||
for _, op := range tx.DoOperations {
|
||||
if "insert" == op.Action && op.ParentID == parent.ID {
|
||||
needAppendEmptyListItem = false
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if needAppendEmptyListItem {
|
||||
parent.AppendChild(treenode.NewParagraph(ast.NewNodeID()))
|
||||
}
|
||||
}
|
||||
treenode.RemoveBlockTree(node.ID)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue