mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-19 02:21:38 +08:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
f10c0bcd4d
@ -2556,6 +2556,38 @@ func exportRefTrees0(tree *parse.Tree, retTrees *map[string]*parse.Tree) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exportRefTrees0(defTree, retTrees)
|
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
|
return ast.WalkContinue
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user