diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/init-bib.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/init-bib.el b/lisp/init-bib.el index 3cdd047..a2f5bc8 100644 --- a/lisp/init-bib.el +++ b/lisp/init-bib.el @@ -80,10 +80,8 @@ point. The link is opened using the settings of (defun km/doi-at-point () "Return DOI at point." (save-excursion - (re-search-backward "[ \t\n]" nil t) - (re-search-forward "\\(doi:[ \t\n]*\\)*\\([-./A-z0-9]+\\)[.; \t\n]" nil t) - (--if-let (match-string-no-properties 2) - (s-chop-suffix "." it) - (error "No DOI found")))) + (skip-chars-backward "-.A-z0-9/") + (and (looking-at "\\(doi:[ \t\n]*\\)*\\([-./A-z0-9]+[A-z0-9]\\)\\b") + (match-string-no-properties 2)))) (provide 'init-bib) |