Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2022-11-26 11:15:10 +08:00
commit 2a948bbb0d
2 changed files with 4 additions and 2 deletions

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
}

View file

@ -111,8 +111,8 @@ func getVirtualRefKeywords(docName string) (ret []string) {
ret = gulu.Str.ExcludeElem(ret, excludes)
if 0 < len(regexps) {
tmp = nil
for _, re := range regexps {
for _, str := range ret {
for _, str := range ret {
for _, re := range regexps {
if ok, regErr := regexp.MatchString(re, str); !ok && nil == regErr {
tmp = append(tmp, str)
break