mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🐛 Fix multiple docs convert to headings https://github.com/siyuan-note/siyuan/issues/13225
This commit is contained in:
parent
75b973d44c
commit
d9155c27b6
13 changed files with 6 additions and 11 deletions
|
|
@ -122,6 +122,8 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||
return
|
||||
}
|
||||
|
||||
FlushTxQueue()
|
||||
|
||||
srcTree, _ := LoadTreeByBlockID(srcID)
|
||||
if nil == srcTree {
|
||||
err = ErrBlockNotFound
|
||||
|
|
@ -274,6 +276,8 @@ func Doc2Heading(srcID, targetID string, after bool) (srcTreeBox, srcTreePath st
|
|||
}
|
||||
|
||||
func Heading2Doc(srcHeadingID, targetBoxID, targetPath, previousPath string) (srcRootBlockID, newTargetPath string, err error) {
|
||||
FlushTxQueue()
|
||||
|
||||
srcTree, _ := LoadTreeByBlockID(srcHeadingID)
|
||||
if nil == srcTree {
|
||||
err = ErrBlockNotFound
|
||||
|
|
|
|||
|
|
@ -28,6 +28,8 @@ import (
|
|||
)
|
||||
|
||||
func ListItem2Doc(srcListItemID, targetBoxID, targetPath, previousPath string) (srcRootBlockID, newTargetPath string, err error) {
|
||||
FlushTxQueue()
|
||||
|
||||
srcTree, _ := LoadTreeByBlockID(srcListItemID)
|
||||
if nil == srcTree {
|
||||
err = ErrBlockNotFound
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue