1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

org-link-plain-re: Do not allow spaces inside URL

* lisp/ol.el (org-link-make-regexps): Improve plain URL regexp.
Prohibit all kinds of spaces.

Suggested-by: Max Nikulin <manikulin@gmail.com>
Link: https://orgmode.org/list/v516i1$kuv$1@ciao.gmane.io
This commit is contained in:
Ihor Radchenko 2024-06-22 15:35:47 +02:00
parent 7fa1694ec6
commit 6cada29c08
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B

View File

@ -943,7 +943,7 @@ This should be called after the variable `org-link-parameters' has changed."
(group
(1+ (or (regex ,non-space-bracket)
,parenthesis))
(or (regexp "[^[:punct:] \t\n]")
(or (regexp "[^[:punct:][:space:]\n]")
;; Allow "-" punctuation, as an exception
;; See https://list.orgmode.org/orgmode/87sexh9ddv.fsf@ice9.digital/
;; This is also in line with the heuristics