🎨 Improve search result highlight and positioning https://github.com/siyuan-note/siyuan/issues/8274

This commit is contained in:
Liang Ding 2023-05-19 11:52:12 +08:00
parent 768555ca4b
commit 535def1acf
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -673,7 +673,7 @@ func GetDoc(startID, endID, id string, index int, query string, queryTypes map[s
subTree := &parse.Tree{ID: rootID, Root: &ast.Node{Type: ast.NodeDocument}, Marks: tree.Marks}
var keywords []string
if 0 == queryMethod || 1 == queryMethod { // 只有关键字搜索和查询语法搜索才支持高亮
if "" != query && (0 == queryMethod || 1 == queryMethod) { // 只有关键字搜索和查询语法搜索才支持高亮
if 0 == queryMethod {
query = stringQuery(query)
}