🎨 Database index content/markdown values no longer contain zero-width spaces https://github.com/siyuan-note/siyuan/issues/15204

This commit is contained in:
Daniel 2025-07-03 10:01:04 +08:00
parent 2673ae343f
commit 286223db84
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
4 changed files with 12 additions and 0 deletions

View file

@ -24,6 +24,7 @@ import (
"github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/88250/lute/editor"
"github.com/88250/lute/lex"
"github.com/88250/lute/parse"
"github.com/araddon/dateparse"
@ -69,6 +70,7 @@ func SetBlockReminder(id string, timed string) (err error) {
}
content := sql.NodeStaticContent(node, nil, false, false, false)
content = gulu.Str.SubStr(content, 128)
content = strings.ReplaceAll(content, editor.Zwsp, "")
err = SetCloudBlockReminder(id, content, timedMills)
if err != nil {
return

View file

@ -26,6 +26,7 @@ import (
"github.com/88250/gulu"
"github.com/88250/lute"
"github.com/88250/lute/ast"
"github.com/88250/lute/editor"
"github.com/88250/lute/parse"
"github.com/ClarkThan/ahocorasick"
"github.com/dgraph-io/ristretto"
@ -54,6 +55,7 @@ func getBlockVirtualRefKeywords(root *ast.Node) (ret []string) {
}
content := sql.NodeStaticContent(n, nil, false, false, false)
content = strings.ReplaceAll(content, editor.Zwsp, "")
buf.WriteString(content)
return ast.WalkContinue
})