diff --git a/org-roam-db.el b/org-roam-db.el index 31926f6..10c2e0a 100644 --- a/org-roam-db.el +++ b/org-roam-db.el @@ -470,7 +470,7 @@ INFO is the org-element parsed buffer." (let (rows) (dolist (ref refs) (save-match-data - (cond ((string-equal (substring ref 0 1) "@") + (cond ((string-prefix-p "@" ref) (push (vector node-id (substring ref 1) "cite") rows)) ((string-match org-link-plain-re ref) (push (vector node-id (match-string 2 ref) (match-string 1 ref)) rows)) diff --git a/org-roam-node.el b/org-roam-node.el index 03e9aa8..9883139 100644 --- a/org-roam-node.el +++ b/org-roam-node.el @@ -260,7 +260,7 @@ Return nil if there's no node with such REF." ((string-match org-link-plain-re ref) (setq type (match-string 1 ref) path (match-string 2 ref))) - ((string-equal (substring ref 0 1) "@") + ((string-prefix-p "@" ref) (setq type "cite" path (substring ref 1)))) (when (and type path)