mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02: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}
|
||||
}
|
||||
isContainer := node.IsContainerBlock()
|
||||
if !isContainer {
|
||||
slices.Reverse(toInserts)
|
||||
}
|
||||
|
||||
for i := 0; i < len(toInserts); i++ {
|
||||
toInsert := toInserts[i]
|
||||
if isContainer {
|
||||
|
@ -720,6 +724,9 @@ func (tx *Transaction) doAppendInsert(operation *Operation) (ret *TxErr) {
|
|||
} else {
|
||||
node.InsertAfter(toInsert)
|
||||
}
|
||||
|
||||
createdUpdated(toInsert)
|
||||
tx.nodes[toInsert.ID] = toInsert
|
||||
}
|
||||
|
||||
createdUpdated(insertedNode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue