mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
🎨 The database-bound block is automatically added to the database after being copied as a replica https://github.com/siyuan-note/siyuan/issues/11959
This commit is contained in:
parent
74c6b9ba00
commit
9cc334698b
4 changed files with 23 additions and 6 deletions
|
|
@ -39,7 +39,7 @@ import (
|
|||
"golang.org/x/time/rate"
|
||||
)
|
||||
|
||||
func resetTree(tree *parse.Tree, titleSuffix string) {
|
||||
func resetTree(tree *parse.Tree, titleSuffix string, removeAvBinding bool) {
|
||||
tree.ID = ast.NewNodeID()
|
||||
tree.Root.ID = tree.ID
|
||||
|
||||
|
|
@ -121,8 +121,10 @@ func resetTree(tree *parse.Tree, titleSuffix string) {
|
|||
return ast.WalkContinue
|
||||
})
|
||||
|
||||
// 清空文档绑定的数据库
|
||||
tree.Root.RemoveIALAttr(av.NodeAttrNameAvs)
|
||||
if removeAvBinding {
|
||||
// 清空文档绑定的数据库
|
||||
tree.Root.RemoveIALAttr(av.NodeAttrNameAvs)
|
||||
}
|
||||
}
|
||||
|
||||
func pagedPaths(localPath string, pageSize int) (ret map[int][]string) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue