mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-23 10:00:13 +01:00
🎨 Improve highlighting of numbers and letters in global search preview Fix https://github.com/siyuan-note/siyuan/issues/8100
This commit is contained in:
parent
2494412f77
commit
a5be0036e9
3 changed files with 10 additions and 7 deletions
|
|
@ -676,7 +676,7 @@ func GetDoc(startID, endID, id string, index int, keyword string, mode int, size
|
|||
// 支持代码块搜索定位 https://github.com/siyuan-note/siyuan/issues/5520
|
||||
if ast.NodeCodeBlockCode == n.Type && 0 < len(keywords) && !treenode.IsChartCodeBlockCode(n) {
|
||||
text := string(n.Tokens)
|
||||
text = search.EncloseHighlighting(text, keywords, search.SearchMarkLeft, search.SearchMarkRight, Conf.Search.CaseSensitive)
|
||||
text = search.EncloseHighlighting(text, keywords, search.SearchMarkLeft, search.SearchMarkRight, Conf.Search.CaseSensitive, false)
|
||||
n.Tokens = gulu.Str.ToBytes(text)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue