mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
a85467751f
commit
29244a1f8c
1 changed files with 7 additions and 0 deletions
|
|
@ -692,6 +692,10 @@ func (tx *Transaction) doAppendInsert(operation *Operation) (ret *TxErr) {
|
||||||
return &TxErr{code: TxErrCodeBlockNotFound, id: operation.ParentID}
|
return &TxErr{code: TxErrCodeBlockNotFound, id: operation.ParentID}
|
||||||
}
|
}
|
||||||
isContainer := node.IsContainerBlock()
|
isContainer := node.IsContainerBlock()
|
||||||
|
if !isContainer {
|
||||||
|
slices.Reverse(toInserts)
|
||||||
|
}
|
||||||
|
|
||||||
for i := 0; i < len(toInserts); i++ {
|
for i := 0; i < len(toInserts); i++ {
|
||||||
toInsert := toInserts[i]
|
toInsert := toInserts[i]
|
||||||
if isContainer {
|
if isContainer {
|
||||||
|
|
@ -720,6 +724,9 @@ func (tx *Transaction) doAppendInsert(operation *Operation) (ret *TxErr) {
|
||||||
} else {
|
} else {
|
||||||
node.InsertAfter(toInsert)
|
node.InsertAfter(toInsert)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
createdUpdated(toInsert)
|
||||||
|
tx.nodes[toInsert.ID] = toInsert
|
||||||
}
|
}
|
||||||
|
|
||||||
createdUpdated(insertedNode)
|
createdUpdated(insertedNode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue