|
@@ -5669,54 +5669,55 @@ stacked delimiters is N. Escaping delimiters is not possible."
|
|
|
(defun org-make-link-regexps ()
|
|
|
"Update the link regular expressions.
|
|
|
This should be called after the variable `org-link-types' has changed."
|
|
|
- (setq org-link-types-re
|
|
|
- (concat "\\`" (regexp-opt org-link-types t) ":\\(?://\\)")
|
|
|
- org-link-re-with-space
|
|
|
- (concat "<?" (regexp-opt org-link-types t) ":\\(?://\\)"
|
|
|
- "\\([^" org-non-link-chars " ]"
|
|
|
- "[^" org-non-link-chars "]*"
|
|
|
- "[^" org-non-link-chars " ]\\)>?")
|
|
|
- org-link-re-with-space2
|
|
|
- (concat "<?" (regexp-opt org-link-types t) ":\\(?://\\)?"
|
|
|
- "\\([^" org-non-link-chars " ]"
|
|
|
- "[^\t\n\r]*"
|
|
|
- "[^" org-non-link-chars " ]\\)>?")
|
|
|
- org-link-re-with-space3
|
|
|
- (concat "<?" (regexp-opt org-link-types t) ":\\(?://\\)?"
|
|
|
- "\\([^" org-non-link-chars " ]"
|
|
|
- "[^\t\n\r]*\\)")
|
|
|
- org-angle-link-re
|
|
|
- (concat "<" (regexp-opt org-link-types t) ":\\(?://\\)?"
|
|
|
- "\\([^" org-non-link-chars " ]"
|
|
|
- "[^" org-non-link-chars "]*"
|
|
|
- "\\)>")
|
|
|
- org-plain-link-re
|
|
|
- (concat
|
|
|
- "\\<" (regexp-opt org-link-types t) ":\\(?://\\)?"
|
|
|
- (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)"))
|
|
|
- ;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
|
|
|
- org-bracket-link-regexp
|
|
|
- "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
|
|
|
- org-bracket-link-analytic-regexp
|
|
|
- (concat
|
|
|
- "\\[\\["
|
|
|
- "\\(" (regexp-opt org-link-types t) ":\\(?://\\)?\\)?"
|
|
|
- "\\([^]]+\\)"
|
|
|
- "\\]"
|
|
|
- "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
|
|
|
- "\\]")
|
|
|
- org-bracket-link-analytic-regexp++
|
|
|
- (concat
|
|
|
- "\\[\\["
|
|
|
- "\\(" (regexp-opt (cons "coderef" org-link-types) t) ":\\(?://\\)?\\)?"
|
|
|
- "\\([^]]+\\)"
|
|
|
- "\\]"
|
|
|
- "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
|
|
|
- "\\]")
|
|
|
- org-any-link-re
|
|
|
- (concat "\\(" org-bracket-link-regexp "\\)\\|\\("
|
|
|
- org-angle-link-re "\\)\\|\\("
|
|
|
- org-plain-link-re "\\)")))
|
|
|
+ (let ((types-re (regexp-opt org-link-types t)))
|
|
|
+ (setq org-link-types-re
|
|
|
+ (concat "\\`" types-re ":")
|
|
|
+ org-link-re-with-space
|
|
|
+ (concat "<?" types-re ":"
|
|
|
+ "\\([^" org-non-link-chars " ]"
|
|
|
+ "[^" org-non-link-chars "]*"
|
|
|
+ "[^" org-non-link-chars " ]\\)>?")
|
|
|
+ org-link-re-with-space2
|
|
|
+ (concat "<?" types-re ":"
|
|
|
+ "\\([^" org-non-link-chars " ]"
|
|
|
+ "[^\t\n\r]*"
|
|
|
+ "[^" org-non-link-chars " ]\\)>?")
|
|
|
+ org-link-re-with-space3
|
|
|
+ (concat "<?" types-re ":"
|
|
|
+ "\\([^" org-non-link-chars " ]"
|
|
|
+ "[^\t\n\r]*\\)")
|
|
|
+ org-angle-link-re
|
|
|
+ (concat "<" types-re ":"
|
|
|
+ "\\([^" org-non-link-chars " ]"
|
|
|
+ "[^" org-non-link-chars "]*"
|
|
|
+ "\\)>")
|
|
|
+ org-plain-link-re
|
|
|
+ (concat
|
|
|
+ "\\<" types-re ":"
|
|
|
+ (org-re "\\([^ \t\n()<>]+\\(?:([[:word:]0-9_]+)\\|\\([^[:punct:] \t\n]\\|/\\)\\)\\)"))
|
|
|
+ ;; "\\([^]\t\n\r<>() ]+[^]\t\n\r<>,.;() ]\\)")
|
|
|
+ org-bracket-link-regexp
|
|
|
+ "\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]"
|
|
|
+ org-bracket-link-analytic-regexp
|
|
|
+ (concat
|
|
|
+ "\\[\\["
|
|
|
+ "\\(" types-re ":\\)?"
|
|
|
+ "\\([^]]+\\)"
|
|
|
+ "\\]"
|
|
|
+ "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
|
|
|
+ "\\]")
|
|
|
+ org-bracket-link-analytic-regexp++
|
|
|
+ (concat
|
|
|
+ "\\[\\["
|
|
|
+ "\\(" (regexp-opt (cons "coderef" org-link-types) t) ":\\)?"
|
|
|
+ "\\([^]]+\\)"
|
|
|
+ "\\]"
|
|
|
+ "\\(\\[" "\\([^]]+\\)" "\\]\\)?"
|
|
|
+ "\\]")
|
|
|
+ org-any-link-re
|
|
|
+ (concat "\\(" org-bracket-link-regexp "\\)\\|\\("
|
|
|
+ org-angle-link-re "\\)\\|\\("
|
|
|
+ org-plain-link-re "\\)"))))
|
|
|
|
|
|
(org-make-link-regexps)
|
|
|
|