Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
6eed263539
4 changed files with 6 additions and 6 deletions
2
app/stage/protyle/js/lute/lute.min.js
vendored
2
app/stage/protyle/js/lute/lute.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -7,7 +7,7 @@ require (
|
|||
github.com/88250/css v0.1.2
|
||||
github.com/88250/flock v0.8.2
|
||||
github.com/88250/gulu v1.2.3-0.20220720144315-065ef35ec583
|
||||
github.com/88250/lute v1.7.5-0.20220726230457-76c3332f06c2
|
||||
github.com/88250/lute v1.7.5-0.20220727143137-4554c97d2e0e
|
||||
github.com/88250/melody v0.0.0-20201115062536-c0b3394adcd1
|
||||
github.com/88250/pdfcpu v0.3.13
|
||||
github.com/88250/protyle v0.0.0-20220519012506-0a2c8dc24397
|
||||
|
|
|
@ -58,8 +58,8 @@ github.com/88250/gulu v1.2.0/go.mod h1:ZhEJ98UjR2y7j2toGj4/b+1rRELcZFQAPq/Yjyin2
|
|||
github.com/88250/gulu v1.2.3-0.20220720144315-065ef35ec583 h1:FhA/zJemLrbOYJpdMIMBezO5rGigQSdPR1kv+aztHfA=
|
||||
github.com/88250/gulu v1.2.3-0.20220720144315-065ef35ec583/go.mod h1:I1qBzsksFL2ciGSuqDE7R3XW4BUMrfDgOvSXEk7FsAI=
|
||||
github.com/88250/lute v1.7.4-0.20220426011157-34c9bfa2e148/go.mod h1:Bdu9LRNjQhtL3TftbtpjIWTwDVAXoS7AD8QsZQPk7zo=
|
||||
github.com/88250/lute v1.7.5-0.20220726230457-76c3332f06c2 h1:d8YDlsctGxWC/Bk2sUenJ2Gz5jKZA5bxfYa8vtskMgY=
|
||||
github.com/88250/lute v1.7.5-0.20220726230457-76c3332f06c2/go.mod h1:Bdu9LRNjQhtL3TftbtpjIWTwDVAXoS7AD8QsZQPk7zo=
|
||||
github.com/88250/lute v1.7.5-0.20220727143137-4554c97d2e0e h1:RsAEtEMRUWE3PDBNIqNKp7UfUvlvFP1pSiWbDEYmxIo=
|
||||
github.com/88250/lute v1.7.5-0.20220727143137-4554c97d2e0e/go.mod h1:Bdu9LRNjQhtL3TftbtpjIWTwDVAXoS7AD8QsZQPk7zo=
|
||||
github.com/88250/melody v0.0.0-20201115062536-c0b3394adcd1 h1:9Cb+iN639vUI2OcIBc+4oGwml9/0J6bL6dWNb8Al+1s=
|
||||
github.com/88250/melody v0.0.0-20201115062536-c0b3394adcd1/go.mod h1:jH6MMPr8G7AMzaVmWHXZQiB1DKO3giWbcWZ7UoJ1teI=
|
||||
github.com/88250/pdfcpu v0.3.13 h1:touMWMZkCGalMIbEg9bxYp7rETM+zwb9hXjwhqi4I7Q=
|
||||
|
|
|
@ -34,6 +34,7 @@ import (
|
|||
"github.com/88250/lute/ast"
|
||||
"github.com/88250/lute/html"
|
||||
"github.com/88250/lute/parse"
|
||||
"github.com/88250/lute/render"
|
||||
util2 "github.com/88250/lute/util"
|
||||
"github.com/88250/protyle"
|
||||
"github.com/dustin/go-humanize"
|
||||
|
@ -616,8 +617,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) && !render.IsChartCodeBlockCode(n) {
|
||||
text := string(n.Tokens)
|
||||
text = search.EncloseHighlighting(text, keywords, "__@mark__", "__mark@__", Conf.Search.CaseSensitive)
|
||||
n.Tokens = gulu.Str.ToBytes(text)
|
||||
|
|
Loading…
Add table
Reference in a new issue