mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 Database index content/markdown values no longer contain zero-width spaces https://github.com/siyuan-note/siyuan/issues/15204
This commit is contained in:
parent
2673ae343f
commit
286223db84
4 changed files with 12 additions and 0 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue