summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-16 13:56:42 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-03-16 13:56:42 +0100
commitbab7dcbee8f81adb3f7ecca61bbc3dd622021b68 (patch)
treece3c856808346d3f9ffc505fda56699a70b93369
parent0a8de94b13806216a01ceb8786ac88486f3394a5 (diff)
downloadorg-mode-bab7dcbee8f81adb3f7ecca61bbc3dd622021b68.tar.gz
Fix link fontification
* lisp/org.el (org-activate-links): Stop at paragraph boundaries.
-rw-r--r--lisp/org.el3
1 files changed, 3 insertions, 0 deletions
diff --git a/lisp/org.el b/lisp/org.el
index 24e1549..e588927 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5142,6 +5142,9 @@ This includes angle, plain, and bracket links."
((eq ?\[ (char-after (1+ start))) 'bracket)
(t 'plain))))
(when (and (memq style org-highlight-links)
+ ;; Do not span over paragraph boundaries.
+ (not (string-match-p org-element-paragraph-separate
+ (match-string 0)))
;; Do not confuse plain links with tags.
(not (and (eq style 'plain)
(let ((face (get-text-property