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

This commit is contained in:
Liang Ding 2022-11-26 10:41:44 +08:00
parent 14424d3dc0
commit 04800fdaf3
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -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
}