🎨 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

@ -23,6 +23,7 @@ import (
"github.com/88250/gulu"
"github.com/88250/lute/ast"
"github.com/88250/lute/editor"
"github.com/88250/lute/html"
"github.com/88250/lute/parse"
"github.com/siyuan-note/logging"
@ -117,6 +118,7 @@ func indexNode(tx *sql.Tx, id string) (err error) {
}
content := NodeStaticContent(node, nil, true, indexAssetPath, true)
content = strings.ReplaceAll(content, editor.Zwsp, "")
stmt := "UPDATE blocks SET content = ? WHERE id = ?"
if err = execStmtTx(tx, stmt, content, id); err != nil {
tx.Rollback()