From e394c36159f937875c47ba59b345e7ebef3c504f Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 5 Aug 2022 22:39:36 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E6=A0=87=E9=A2=98=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?=E6=96=87=E6=A1=A3=E5=90=8E=E7=BC=96=E8=BE=91=E5=8E=9F=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E8=A7=A6=E5=8F=91=E7=8A=B6=E6=80=81=E5=BC=82=E5=B8=B8?= =?UTF-8?q?=20Fix=20https://github.com/siyuan-note/siyuan/issues/5576?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/listitem.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kernel/model/listitem.go b/kernel/model/listitem.go index 8b1c4b798..c94c6e8d7 100644 --- a/kernel/model/listitem.go +++ b/kernel/model/listitem.go @@ -95,7 +95,9 @@ func ListItem2Doc(srcListItemID, targetBoxID, targetPath string) (srcRootBlockID srcLiParent.Unlink() } srcTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr()) - + if nil == srcTree.Root.FirstChild { + srcTree.Root.AppendChild(protyle.NewParagraph()) + } if err = indexWriteJSONQueue(srcTree); nil != err { return "", "", err }