forked from mirrors/org-mode
org-link-plain-re: Improve regexp heuristics
* lisp/ol.el (org-link-make-regexps): Match <...> and <...> balanced brackets. This change detects plain links like http://dx.doi.org/10.1002/(SICI)1521-396X(199901)171:1<239::AID-PSSA239>3.0.CO;2-M
This commit is contained in:
parent
5cb52f379b
commit
09ced6d2c2
|
@ -853,12 +853,12 @@ This should be called after the variable `org-link-parameters' has changed."
|
|||
org-link-plain-re
|
||||
(let* ((non-space-bracket "[^][ \t\n()<>]")
|
||||
(parenthesis
|
||||
`(seq "("
|
||||
`(seq (any "<([")
|
||||
(0+ (or (regex ,non-space-bracket)
|
||||
(seq "("
|
||||
(seq (any "<([")
|
||||
(0+ (regex ,non-space-bracket))
|
||||
")")))
|
||||
")")))
|
||||
(any "])>"))))
|
||||
(any "])>"))))
|
||||
;; Heuristics for an URL link inspired by
|
||||
;; https://daringfireball.net/2010/07/improved_regex_for_matching_urls
|
||||
(rx-to-string
|
||||
|
|
Loading…
Reference in New Issue