This commit is contained in:
Liang Ding 2022-10-05 11:16:42 +08:00
parent e1becd6454
commit c1bdf59a6d
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -179,6 +179,9 @@ func SwapBlockRef(refID, defID string, includeChildren bool) (err error) {
li.SetIALAttr("id", newID)
li.SetIALAttr("updated", newID[:14])
li.AppendChild(defNode)
for i := len(defNodeChildren) - 1; -1 < i; i-- {
defNode.InsertAfter(defNodeChildren[i])
}
refPivot.InsertAfter(li)
} else {
defNode.InsertAfter(refNode)