mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
🎨 改进打开虚拟引用后加载文档的性能 https://github.com/siyuan-note/siyuan/issues/7378
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ func GetDocHistoryContent(historyPath, keyword string) (id, rootID, content stri
|
||||
n.RemoveIALAttr("fold")
|
||||
|
||||
if 0 < len(keywords) {
|
||||
if markReplaceSpan(n, &unlinks, keywords, searchMarkDataType, luteEngine) {
|
||||
if markReplaceSpan(n, &unlinks, keywords, search.MarkDataType, luteEngine) {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user