mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-31 22:08:48 +01:00
🎨 Use ID when block ref anchor text is empty https://github.com/siyuan-note/siyuan/issues/13606
This commit is contained in:
parent
929d079bc3
commit
e4fb91d56f
2 changed files with 5 additions and 2 deletions
|
|
@ -1619,7 +1619,10 @@ func updateRefText(refNode *ast.Node, changedDefNodes map[string]*ast.Node) (cha
|
|||
|
||||
changed = true
|
||||
if "d" == subtype {
|
||||
refText = getNodeRefText(defNode)
|
||||
refText = strings.TrimSpace(getNodeRefText(defNode))
|
||||
if "" == refText {
|
||||
refText = n.TextMarkBlockRefID
|
||||
}
|
||||
treenode.SetDynamicBlockRefText(n, refText)
|
||||
}
|
||||
defNodes = append(defNodes, &changedDefNode{id: defID, refText: refText, refType: "ref-" + subtype})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue