mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
♻️ 提取获取 node 锚文本的函数
This commit is contained in:
@@ -91,7 +91,10 @@ func GetBlockRefText(id string) string {
|
||||
if nil == node {
|
||||
return ErrBlockNotFound.Error()
|
||||
}
|
||||
return getNodeRefText(node)
|
||||
}
|
||||
|
||||
func getNodeRefText(node *ast.Node) string {
|
||||
if name := node.IALAttr("name"); "" != name {
|
||||
return name
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user