🎨 改进打开虚拟引用后加载文档的性能 https://github.com/siyuan-note/siyuan/issues/7378

This commit is contained in:
Liang Ding 2023-02-16 12:33:22 +08:00
parent 7d05f4e8c7
commit e89f706864
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
5 changed files with 9 additions and 16 deletions

View file

@ -167,7 +167,7 @@ func buildBacklink(refID string, refTree *parse.Tree, keywords []string, luteEng
return ast.WalkContinue
}
markReplaceSpan(n, &unlinks, keywords, searchMarkDataType, luteEngine)
markReplaceSpan(n, &unlinks, keywords, search.MarkDataType, luteEngine)
return ast.WalkContinue
})
@ -690,7 +690,7 @@ func searchBackmention(mentionKeywords []string, keyword string, excludeBacklink
continue
}
newText := markReplaceSpanWithSplit(text, mentionKeywords, getMarkSpanStart(searchMarkDataType), getMarkSpanEnd())
newText := markReplaceSpanWithSplit(text, mentionKeywords, search.GetMarkSpanStart(search.MarkDataType), search.GetMarkSpanEnd())
if text != newText {
tmp = append(tmp, b)
}