From 24743b68856ba975738246ad8efe088ae8276f0d Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Wed, 27 Jul 2022 21:49:04 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20ECharts=E3=80=81PlantUML=20=E5=92=8C=20?= =?UTF-8?q?Mermaid=20=E7=AD=89=E5=9B=BE=E8=A1=A8=E5=9D=97=E6=8A=A5?= =?UTF-8?q?=E9=94=99=20Fix=20https://github.com/siyuan-note/siyuan/issues/?= =?UTF-8?q?5522?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kernel/model/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/model/file.go b/kernel/model/file.go index 7edc41c47..0a7bf78b1 100644 --- a/kernel/model/file.go +++ b/kernel/model/file.go @@ -616,7 +616,7 @@ func GetDoc(id string, index int, keyword string, mode int, size int) (blockCoun } // 支持代码块搜索定位 https://github.com/siyuan-note/siyuan/issues/5520 - if ast.NodeCodeBlockCode == n.Type { + if ast.NodeCodeBlockCode == n.Type && 0 < len(keywords) { // 搜索高亮 text := string(n.Tokens) text = search.EncloseHighlighting(text, keywords, "__@mark__", "__mark@__", Conf.Search.CaseSensitive)