소스 검색

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

Liang Ding 2 년 전
부모
커밋
78c4e78843
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      kernel/model/file.go

+ 3 - 0
kernel/model/file.go

@@ -674,6 +674,9 @@ func GetDoc(startID, endID, id string, index int, query string, queryTypes map[s
 
 	var keywords []string
 	if 0 == queryMethod || 1 == queryMethod { // 只有关键字搜索和查询语法搜索才支持高亮
+		if 0 == queryMethod {
+			query = stringQuery(query)
+		}
 		typeFilter := buildTypeFilter(queryTypes)
 		keywords = highlightByQuery(query, typeFilter, rootID)
 	}