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
1 changed files with 1 additions and 1 deletions

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