🎨 Improve display reference counts in the backlink panel https://github.com/siyuan-note/siyuan/issues/13678

This commit is contained in:
Daniel 2025-01-01 12:24:58 +08:00
parent 6d7feb461f
commit 2d006a941b
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
3 changed files with 4 additions and 4 deletions

View file

@ -142,7 +142,7 @@ func renderBlockText(node *ast.Node, excludeTypes []string) (ret string) {
return
}
func fillBlockRefCount(nodes []*ast.Node) {
func fillBlockRefCount(nodes []*ast.Node, minRefCount int) {
var defIDs []string
for _, n := range nodes {
ast.Walk(n, func(n *ast.Node, entering bool) ast.WalkStatus {
@ -164,7 +164,7 @@ func fillBlockRefCount(nodes []*ast.Node) {
return ast.WalkContinue
}
if cnt := refCount[n.ID]; 0 < cnt {
if cnt := refCount[n.ID]; minRefCount < cnt {
n.SetIALAttr("refcount", strconv.Itoa(cnt))
}
return ast.WalkContinue