mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-03 15:28:49 +01:00
🎨 块引用与所引用的内容块进行交换 https://github.com/siyuan-note/siyuan/issues/4981
This commit is contained in:
parent
875ffca004
commit
a960ae862e
1 changed files with 6 additions and 0 deletions
|
|
@ -96,12 +96,18 @@ func SwapBlockRef(refID, defID string) (err error) {
|
|||
return
|
||||
}
|
||||
refNode := treenode.GetNodeInTree(refTree, refID)
|
||||
if nil == refNode {
|
||||
return
|
||||
}
|
||||
refParentType := refNode.Parent.Type
|
||||
defTree, err := loadTreeByBlockID(defID)
|
||||
if nil != err {
|
||||
return
|
||||
}
|
||||
defNode := treenode.GetNodeInTree(defTree, defID)
|
||||
if nil == defNode {
|
||||
return
|
||||
}
|
||||
|
||||
refPivot := parse.NewParagraph()
|
||||
refNode.InsertBefore(refPivot)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue