🔥 The database-bound block no longer automatically adds to the database after being copied as a replica https://github.com/siyuan-note/siyuan/issues/12294

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-11-22 18:46:53 +08:00
parent 62bdaf9ec6
commit f55e575253
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
5 changed files with 8 additions and 5 deletions

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20251119142510-7b1583ab4aa0
github.com/88250/lute v1.7.7-0.20251121015707-e61322b7a332
github.com/88250/lute v1.7.7-0.20251122104311-8bc4c75a8f91
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4
github.com/ConradIrwin/font v0.2.1

View file

@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20251119142510-7b1583ab4aa0 h1:ip0IQCJCLtJEDHil+2XSnh3NP39i98SYV5qhWoUeMnA=
github.com/88250/gulu v1.2.3-0.20251119142510-7b1583ab4aa0/go.mod h1:IQ5dXW9CjVmx6B7OfK1Y4ZBKTPMe9q1AkVoLGGzRbS8=
github.com/88250/lute v1.7.7-0.20251121015707-e61322b7a332 h1:rL+puyajSiPpdFXHYSTYLgt2F+cQY82/ly3m3geZYBs=
github.com/88250/lute v1.7.7-0.20251121015707-e61322b7a332/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/lute v1.7.7-0.20251122104311-8bc4c75a8f91 h1:uGTZqI/HYFrkr7M+ZH78QYDCsOrFYOwr7MXfL3t06ww=
github.com/88250/lute v1.7.7-0.20251122104311-8bc4c75a8f91/go.mod h1:WYyUw//5yVw9BJnoVjx7rI/3szsISxNZCYGOqTIrV0o=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46 h1:Bq1JsDfVbHKUxNL/B2JXd8cC/1h6aFjrlXpGycnh0Hk=
github.com/88250/pdfcpu v0.3.14-0.20250424122812-f10e8d9d8d46/go.mod h1:fVfOloBzs2+W2VJCCbq60XIxc3yJHAZ0Gahv1oO0gyI=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

View file

@ -989,6 +989,7 @@ func DuplicateDoc(tree *parse.Tree) {
n.RemoveIALAttr(av.NodeAttrNameAvs)
n.RemoveIALAttr(av.NodeAttrViewNames)
n.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText)
return ast.WalkContinue
})
return

View file

@ -1209,6 +1209,7 @@ func (tx *Transaction) doLargeInsert(previousID string) (ret *TxErr) {
// 复制为副本时移除数据库绑定状态 https://github.com/siyuan-note/siyuan/issues/12294
insertedNode.RemoveIALAttr(av.NodeAttrNameAvs)
insertedNode.RemoveIALAttr(av.NodeAttrViewNames)
insertedNode.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText)
if ast.NodeAttributeView == insertedNode.Type {
// 插入数据库块时需要重新绑定其中已经存在的块
@ -1387,6 +1388,7 @@ func (tx *Transaction) doInsert(operation *Operation) (ret *TxErr) {
// 复制为副本时移除数据库绑定状态 https://github.com/siyuan-note/siyuan/issues/12294
insertedNode.RemoveIALAttr(av.NodeAttrNameAvs)
insertedNode.RemoveIALAttr(av.NodeAttrViewNames)
insertedNode.RemoveIALAttrsByPrefix(av.NodeAttrViewStaticText)
if ast.NodeAttributeView == insertedNode.Type {
// 插入数据库块时需要重新绑定其中已经存在的块