org-lint: Fix #+INCLUDE keyword parsing

* lisp/org-lint.el (org-lint-wrong-include-link-parameter): Use
non-greedy regexp to parse included file name.

Reported-by: gerard.vermeulen@posteo.net
Link: https://orgmode.org/list/ceef41267fcb44cdcbd7986f599bf332@posteo.net
This commit is contained in:
Ihor Radchenko 2022-11-05 11:31:37 +08:00
parent 0d60013f0e
commit a3b9bb8faa
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -652,7 +652,7 @@ in description"
(when (equal (org-element-property :key k) "INCLUDE")
(let* ((value (org-element-property :value k))
(path
(and (string-match "^\\(\".+\"\\|\\S-+\\)[ \t]*" value)
(and (string-match "^\\(\".+?\"\\|\\S-+\\)[ \t]*" value)
(save-match-data
(org-strip-quotes (match-string 1 value))))))
(if (not path)