mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-05-04 05:29:12 +08:00
🎨 Backlink count at the doc block title including sub-blocks https://github.com/siyuan-note/siyuan/issues/13791
This commit is contained in:
parent
ecf9d3a7d8
commit
558e18f52f
@ -456,8 +456,13 @@ func getRefIDsByFileAnnotationID(c *gin.Context) {
|
|||||||
|
|
||||||
id := arg["id"].(string)
|
id := arg["id"].(string)
|
||||||
refIDs := model.GetBlockRefIDsByFileAnnotationID(id)
|
refIDs := model.GetBlockRefIDsByFileAnnotationID(id)
|
||||||
ret.Data = map[string][]string{
|
var retRefDefs []model.RefDefs
|
||||||
"refIDs": refIDs,
|
for _, blockID := range refIDs {
|
||||||
|
retRefDefs = append(retRefDefs, model.RefDefs{RefID: blockID, DefIDs: []string{}})
|
||||||
|
}
|
||||||
|
|
||||||
|
ret.Data = map[string]any{
|
||||||
|
"refDefs": retRefDefs,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -478,7 +483,14 @@ func getBlockDefIDsByRefText(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
excludeIDs = nil // 不限制虚拟引用搜索自己 https://ld246.com/article/1633243424177
|
excludeIDs = nil // 不限制虚拟引用搜索自己 https://ld246.com/article/1633243424177
|
||||||
ids := model.GetBlockDefIDsByRefText(anchor, excludeIDs)
|
ids := model.GetBlockDefIDsByRefText(anchor, excludeIDs)
|
||||||
ret.Data = ids
|
var retRefDefs []model.RefDefs
|
||||||
|
for _, id := range ids {
|
||||||
|
retRefDefs = append(retRefDefs, model.RefDefs{RefID: id, DefIDs: []string{}})
|
||||||
|
}
|
||||||
|
|
||||||
|
ret.Data = map[string]any{
|
||||||
|
"refDefs": retRefDefs,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getBlockBreadcrumb(c *gin.Context) {
|
func getBlockBreadcrumb(c *gin.Context) {
|
||||||
|
Loading…
Reference in New Issue
Block a user