♻️ 提取获取 node 锚文本的函数
This commit is contained in:
parent
1feecff511
commit
3555df9267
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue