Use John Gruber's regular expression for URL's
http://daringfireball.net/2009/11/liberal_regex_for_matching_urls
This commit is contained in:
parent
3bc637a2a1
commit
facedba057
|
@ -1,5 +1,10 @@
|
||||||
2009-12-09 Carsten Dominik <carsten.dominik@gmail.com>
|
2009-12-09 Carsten Dominik <carsten.dominik@gmail.com>
|
||||||
|
|
||||||
|
* org.el (org-make-link-regexps): Use John Gruber's regexp for
|
||||||
|
urls.
|
||||||
|
|
||||||
|
* org-macs.el (org-re): Interpret :punct: in regexps.
|
||||||
|
|
||||||
* org-exp.el (org-export-replace-src-segments-and-examples): Also
|
* org-exp.el (org-export-replace-src-segments-and-examples): Also
|
||||||
take the final newline after the END line.
|
take the final newline after the END line.
|
||||||
|
|
||||||
|
|
|
@ -63,6 +63,8 @@ Also, do not record undo information."
|
||||||
(setq ss (replace-match "a-zA-Z0-9" t t ss)))
|
(setq ss (replace-match "a-zA-Z0-9" t t ss)))
|
||||||
(while (string-match "\\[:alpha:\\]" ss)
|
(while (string-match "\\[:alpha:\\]" ss)
|
||||||
(setq ss (replace-match "a-zA-Z" t t ss)))
|
(setq ss (replace-match "a-zA-Z" t t ss)))
|
||||||
|
(while (string-match "\\[:punct:\\]" ss)
|
||||||
|
(setq ss (replace-match "\001-@[-`{-~" t t ss)))
|
||||||
ss))
|
ss))
|
||||||
s))
|
s))
|
||||||
|
|
||||||
|
|
|
@ -4384,7 +4384,8 @@ This should be called after the variable `org-link-types' has changed."
|
||||||
org-plain-link-re
|
org-plain-link-re
|
||||||
(concat
|
(concat
|
||||||
"\\<\\(" (mapconcat 'identity org-link-types "\\|") "\\):"
|
"\\<\\(" (mapconcat 'identity org-link-types "\\|") "\\):"
|
||||||
"\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
|
(org-re "[^ \t\n()<>]+\\(?:([[:word:]0-9]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)"))
|
||||||
|
;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
|
||||||
org-bracket-link-regexp
|
org-bracket-link-regexp
|
||||||
"\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
|
"\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
|
||||||
org-bracket-link-analytic-regexp
|
org-bracket-link-analytic-regexp
|
||||||
|
|
Loading…
Reference in New Issue