🎨 Improve block ref anchor text exporting Fix https://github.com/siyuan-note/siyuan/issues/11995
This commit is contained in:
parent
687421fe62
commit
bcd12057bc
1 changed files with 7 additions and 2 deletions
|
@ -2009,8 +2009,13 @@ func exportTree(tree *parse.Tree, wysiwyg, keepFold bool,
|
|||
n.InsertBefore(blockRefLink)
|
||||
unlinks = append(unlinks, n)
|
||||
case 3: // 仅锚文本
|
||||
blockRefLink := &ast.Node{Type: ast.NodeTextMark, TextMarkType: "text", TextMarkTextContent: linkText}
|
||||
blockRefLink.KramdownIAL = n.KramdownIAL
|
||||
var blockRefLink *ast.Node
|
||||
if 0 < len(n.KramdownIAL) {
|
||||
blockRefLink = &ast.Node{Type: ast.NodeTextMark, TextMarkType: "text", TextMarkTextContent: linkText}
|
||||
blockRefLink.KramdownIAL = n.KramdownIAL
|
||||
} else {
|
||||
blockRefLink = &ast.Node{Type: ast.NodeText, Tokens: []byte(linkText)}
|
||||
}
|
||||
n.InsertBefore(blockRefLink)
|
||||
unlinks = append(unlinks, n)
|
||||
case 4: // 脚注
|
||||
|
|
Loading…
Add table
Reference in a new issue