🎨 标点符号不纳入虚拟引用和提及搜索 https://github.com/siyuan-note/siyuan/issues/6272

This commit is contained in:
Liang Ding 2022-10-20 00:58:54 +08:00
parent a70dfc8b20
commit f5cc328a9b
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
3 changed files with 20 additions and 3 deletions

View file

@ -716,6 +716,7 @@ func buildTreeBackmention(defSQLBlock *sql.Block, refBlocks []*Block, keyword st
for _, v := range set.Values() {
mentionKeywords = append(mentionKeywords, v.(string))
}
mentionKeywords = prepareMarkKeywords(mentionKeywords)
ret = searchBackmention(mentionKeywords, keyword, excludeBacklinkIDs, rootID, beforeLen)
return
}
@ -726,9 +727,6 @@ func searchBackmention(mentionKeywords []string, keyword string, excludeBacklink
if 1 > len(mentionKeywords) {
return
}
sort.SliceStable(mentionKeywords, func(i, j int) bool {
return len(mentionKeywords[i]) < len(mentionKeywords[j])
})
table := "blocks_fts" // 大小写敏感
if !Conf.Search.CaseSensitive {