🎨 Use ID when block ref anchor text is empty https://github.com/siyuan-note/siyuan/issues/13606

This commit is contained in:
Daniel 2024-12-25 16:13:10 +08:00
parent 97b0faa0b9
commit 7632fc0a27
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -451,6 +451,11 @@ func SetDynamicBlockRefText(blockRef *ast.Node, refText string) {
return
}
refText = strings.TrimSpace(refText)
if "" == refText {
refText = blockRef.TextMarkBlockRefID
}
blockRef.TextMarkBlockRefSubtype = "d"
blockRef.TextMarkTextContent = refText