浏览代码

:bug: Search results preview contains escape character issue https://github.com/siyuan-note/siyuan/issues/9790 https://ld246.com/article/1709035088865

Daniel 1 年之前
父节点
当前提交
8d28c4edc9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      kernel/search/mark.go

+ 1 - 1
kernel/search/mark.go

@@ -118,7 +118,7 @@ func EncloseHighlighting(text string, keywords []string, openMark, closeMark str
 	}
 
 	// 搜索结果预览包含转义符问题 Search results preview contains escape character issue https://github.com/siyuan-note/siyuan/issues/9790
-	ret = strings.ReplaceAll(ret, "\\<span", "\\\\<span ")
+	ret = strings.ReplaceAll(ret, "\\<span", "\\\\<span")
 	return
 }