Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: 折叠列表项转换为文档时自动展开子块 Fix https://github.com/siyuan-note/siyuan/issues/6719

Liang Ding04800fdaf35f
diff --git a/kernel/model/listitem.go b/kernel/model/listitem.go
index 0407688bae..e89e12c38d 100644
--- a/kernel/model/listitem.go
+++ b/kernel/model/listitem.go
@@ -87,6 +87,7 @@ func ListItem2Doc(srcListItemID, targetBoxID, targetPath string) (srcRootBlockID
listItemNode.SetIALAttr("type", "doc")
listItemNode.SetIALAttr("id", srcListItemID)
listItemNode.SetIALAttr("title", listItemText)
+ listItemNode.RemoveIALAttr("fold")
newTree.Root.KramdownIAL = listItemNode.KramdownIAL
srcLiParent := listItemNode.Parent
listItemNode.Unlink()
@@ -103,6 +104,7 @@ func ListItem2Doc(srcListItemID, targetBoxID, targetPath string) (srcRootBlockID
newTree.Box, newTree.Path = targetBoxID, newTargetPath
newTree.Root.SetIALAttr("updated", util.CurrentTimeSecondsStr())
+ newTree.Root.Spec = "1"
if err = indexWriteJSONQueue(newTree); nil != err {
return "", "", err
}