This commit is contained in:
Daniel 2024-12-01 12:25:00 +08:00
parent 855b1945de
commit a7ee282044
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
2 changed files with 68 additions and 3 deletions

View file

@ -103,6 +103,13 @@ func IsBlockRef(n *ast.Node) bool {
return ast.NodeTextMark == n.Type && n.IsTextMarkType("block-ref")
}
func IsBlockLink(n *ast.Node) bool {
if nil == n {
return false
}
return ast.NodeTextMark == n.Type && n.IsTextMarkType("a") && strings.HasPrefix(n.TextMarkAHref, "siyuan://blocks/")
}
func IsFileAnnotationRef(n *ast.Node) bool {
if nil == n {
return false