🎨 虚拟引用不再缓存关键字 Fix https://github.com/siyuan-note/siyuan/issues/6602

This commit is contained in:
Liang Ding 2022-11-17 23:03:24 +08:00
parent bec79ce100
commit a1c74e4d90
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 30 additions and 0 deletions

View file

@ -28,6 +28,11 @@ import (
)
func QueryVirtualRefKeywords(name, alias, anchor, doc bool) (ret []string) {
ret, ok := getVirtualRefKeywordsCache()
if ok {
return ret
}
if name {
ret = append(ret, queryNames()...)
}
@ -44,6 +49,7 @@ func QueryVirtualRefKeywords(name, alias, anchor, doc bool) (ret []string) {
sort.SliceStable(ret, func(i, j int) bool {
return len(ret[i]) >= len(ret[j])
})
setVirtualRefKeywords(ret)
return
}