summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-08-20 14:24:38 +0200
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-08-20 14:24:38 +0200
commitf3474724ad5cbee318df1f38d67d175652958567 (patch)
tree539a70eddd6fba4b5e12f4e1b80b80b20a0724c5
parente48fac5231258e3cdef8802fbb0846cfd5cab53c (diff)
downloadorg-mode-f3474724ad5cbee318df1f38d67d175652958567.tar.gz
ol: Allow [[\\\\]] links
* lisp/ol.el (org-link-make-regexps): Allow [[\\\\]] links.
-rw-r--r--lisp/ol.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/ol.el b/lisp/ol.el
index a6f76a3..a2fb3a8 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -714,11 +714,12 @@ This should be called after the variable `org-link-parameters' has changed."
(rx (seq "[["
;; URI part: match group 1.
(group
- (*? anything)
;; Allow an even number of backslashes right
;; before the closing bracket.
- (not (any "\\"))
- (zero-or-more "\\\\"))
+ (or (one-or-more "\\\\")
+ (and (*? anything)
+ (not (any "\\"))
+ (zero-or-more "\\\\"))))
"]"
;; Description (optional): match group 2.
(opt "[" (group (+? anything)) "]")