mirror of
https://git.savannah.gnu.org/git/emacs/org-mode.git
synced 2024-08-25 05:32:51 +00:00
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 a new issue