summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-24 15:03:47 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-01-24 15:03:47 +0100
commit24030ef62b149a31ac3b51a13e0149c16f95c47f (patch)
tree979e891d3d0f71e1b2b39a637fb903c4cadb9993
parent010a35f193041ec14697bcd405c002d340ee9405 (diff)
downloadorg-mode-24030ef62b149a31ac3b51a13e0149c16f95c47f.tar.gz
Fix consecutive radio links
* lisp/org.el (org-activate-target-links): Properly match consecutive radio links. Reported-by: Jay Dresser <jay@jaydresser.us> <http://lists.gnu.org/r/emacs-orgmode/2019-01/msg00327.html>
-rw-r--r--lisp/org.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 354f437..3b6d113 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6163,6 +6163,9 @@ by a #."
"Add text properties for target matches."
(when org-target-link-regexp
(let ((case-fold-search t))
+ ;; `org-target-link-regexp' matches one character before the
+ ;; actual target.
+ (unless (bolp) (forward-char -1))
(when (re-search-forward org-target-link-regexp limit t)
(org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1))
(add-text-properties (match-beginning 1) (match-end 1)