mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-21 07:46:09 +01:00
🎨 改进提及和虚拟引用搜索分词 Fix https://github.com/siyuan-note/siyuan/issues/6176
This commit is contained in:
parent
94f5ede090
commit
0b7c6a851e
2 changed files with 13 additions and 2 deletions
|
|
@ -649,8 +649,14 @@ func markReplaceSpan(text string, keywords []string, replacementStart, replaceme
|
|||
|
||||
for _, k := range keywords {
|
||||
if gulu.Str.IsASCII(k) {
|
||||
if part == k {
|
||||
parts[i] = replacementStart + k + replacementEnd
|
||||
if gulu.Str.IsASCII(part) {
|
||||
if part == k {
|
||||
parts[i] = replacementStart + k + replacementEnd
|
||||
}
|
||||
} else {
|
||||
if strings.Contains(part, k) {
|
||||
parts[i] = strings.ReplaceAll(part, k, replacementStart+k+replacementEnd)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if strings.Contains(part, k) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue