mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 00:20:12 +01:00
🐛 Search results preview contains escape character issue https://github.com/siyuan-note/siyuan/issues/9790
This commit is contained in:
parent
d54462870f
commit
1da871ac5b
1 changed files with 3 additions and 0 deletions
|
|
@ -116,6 +116,9 @@ func EncloseHighlighting(text string, keywords []string, openMark, closeMark str
|
||||||
if reg, err := regexp.Compile(re); nil == err {
|
if reg, err := regexp.Compile(re); nil == err {
|
||||||
ret = reg.ReplaceAllStringFunc(text, func(s string) string { return openMark + s + closeMark })
|
ret = reg.ReplaceAllStringFunc(text, func(s string) string { return openMark + s + closeMark })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 搜索结果预览包含转义符问题 Search results preview contains escape character issue https://github.com/siyuan-note/siyuan/issues/9790
|
||||||
|
ret = strings.ReplaceAll(ret, "\\<span", "\\\\<span ")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue