mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 23:32:40 +08:00
🐛 标题转换文档后编辑原文档触发状态异常 Fix https://github.com/siyuan-note/siyuan/issues/5576
This commit is contained in:
parent
fbfad46818
commit
eb823ce35a
@ -26,6 +26,7 @@ import (
|
|||||||
"github.com/88250/gulu"
|
"github.com/88250/gulu"
|
||||||
"github.com/88250/lute/ast"
|
"github.com/88250/lute/ast"
|
||||||
"github.com/88250/lute/parse"
|
"github.com/88250/lute/parse"
|
||||||
|
"github.com/88250/protyle"
|
||||||
"github.com/siyuan-note/siyuan/kernel/cache"
|
"github.com/siyuan-note/siyuan/kernel/cache"
|
||||||
"github.com/siyuan-note/siyuan/kernel/sql"
|
"github.com/siyuan-note/siyuan/kernel/sql"
|
||||||
"github.com/siyuan-note/siyuan/kernel/treenode"
|
"github.com/siyuan-note/siyuan/kernel/treenode"
|
||||||
@ -297,6 +298,9 @@ func Heading2Doc(srcHeadingID, targetBoxID, targetPath string) (srcRootBlockID,
|
|||||||
|
|
||||||
headingNode.Unlink()
|
headingNode.Unlink()
|
||||||
srcTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
srcTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
|
||||||
|
if nil == srcTree.Root.FirstChild {
|
||||||
|
srcTree.Root.AppendChild(protyle.NewParagraph())
|
||||||
|
}
|
||||||
if err = indexWriteJSONQueue(srcTree); nil != err {
|
if err = indexWriteJSONQueue(srcTree); nil != err {
|
||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user