mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 07:00:12 +01:00
🔥 Revert Improve display reference counts in embed blocks https://github.com/siyuan-note/siyuan/issues/14129
This commit is contained in:
parent
b3105faf65
commit
36de38798d
3 changed files with 4 additions and 4 deletions
|
|
@ -144,7 +144,7 @@ func renderBlockText(node *ast.Node, excludeTypes []string, removeLineBreak bool
|
|||
return
|
||||
}
|
||||
|
||||
func fillBlockRefCount(nodes []*ast.Node, minRefCount int) {
|
||||
func fillBlockRefCount(nodes []*ast.Node) {
|
||||
var defIDs []string
|
||||
for _, n := range nodes {
|
||||
ast.Walk(n, func(n *ast.Node, entering bool) ast.WalkStatus {
|
||||
|
|
@ -166,7 +166,7 @@ func fillBlockRefCount(nodes []*ast.Node, minRefCount int) {
|
|||
return ast.WalkContinue
|
||||
}
|
||||
|
||||
if cnt := refCount[n.ID]; minRefCount < cnt {
|
||||
if cnt := refCount[n.ID]; 0 < cnt {
|
||||
n.SetIALAttr("refcount", strconv.Itoa(cnt))
|
||||
}
|
||||
return ast.WalkContinue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue