🎨 Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791

This commit is contained in:
Daniel 2025-01-12 22:35:49 +08:00
parent 1cdf74ba09
commit 5a9bb84641
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -345,16 +345,16 @@ type RefDefs struct {
DefIDs []string `json:"defIDs"`
}
func GetBlockRefs(defID string) (refDefs []*RefDefs, originalRefIDs map[string]string) {
func GetBlockRefs(defID string) (refDefs []*RefDefs, originalRefBlockIDs map[string]string) {
refDefs = []*RefDefs{}
originalRefIDs = map[string]string{}
originalRefBlockIDs = map[string]string{}
bt := treenode.GetBlockTree(defID)
if nil == bt {
return
}
refDefs = queryBlockRefDefs(bt)
originalRefIDs = buildBacklinkListItemRefs(refDefs)
originalRefBlockIDs = buildBacklinkListItemRefs(refDefs)
return
}