Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f10c0bcd4d
1 changed files with 32 additions and 0 deletions
|
@ -2556,6 +2556,38 @@ func exportRefTrees0(tree *parse.Tree, retTrees *map[string]*parse.Tree) {
|
|||
}
|
||||
|
||||
exportRefTrees0(defTree, retTrees)
|
||||
} else if ast.NodeAttributeView == n.Type {
|
||||
// 导出数据库所在文档时一并导出绑定块所在文档
|
||||
// Export the binding block docs when exporting the doc where the database is located https://github.com/siyuan-note/siyuan/issues/11486
|
||||
|
||||
avID := n.AttributeViewID
|
||||
if "" == avID {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
attrView, _ := av.ParseAttributeView(avID)
|
||||
if nil == attrView {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
blockKeyValues := attrView.GetBlockKeyValues()
|
||||
if nil == blockKeyValues {
|
||||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
for _, val := range blockKeyValues.Values {
|
||||
defBlock := treenode.GetBlockTree(val.BlockID)
|
||||
if nil == defBlock {
|
||||
continue
|
||||
}
|
||||
|
||||
defTree, _ := LoadTreeByBlockID(defBlock.RootID)
|
||||
if nil == defTree {
|
||||
continue
|
||||
}
|
||||
|
||||
exportRefTrees0(defTree, retTrees)
|
||||
}
|
||||
}
|
||||
return ast.WalkContinue
|
||||
})
|
||||
|
|
Loading…
Add table
Reference in a new issue