branch: externals/org
commit d98a49648066ce80f1193d36accb81253a4027df
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    org-lint: Fix regexp when matching header-args
    
    * lisp/org-lint.el (org-lint-wrong-header-argument): Correctly handle
    header-args:lang+ properties.
    
    Reported-by: Rudolf Adamkovič <salu...@me.com>
    Link: https://orgmode.org/list/m2y1ta9rqe....@me.com
---
 lisp/org-lint.el | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/lisp/org-lint.el b/lisp/org-lint.el
index a9fe2b7e62..351f92b162 100644
--- a/lisp/org-lint.el
+++ b/lisp/org-lint.el
@@ -1066,8 +1066,10 @@ Use \"export %s\" instead"
          (`keyword
           (when (string= (org-element-property :key datum) "PROPERTY")
             (let ((value (org-element-property :value datum)))
-              (when (string-match "\\`header-args\\(?::\\(\\S-+\\)\\)?\\+? *"
-                                  value)
+              (when (or (string-match "\\`header-args\\(?::\\(\\S-+\\)\\)?\\+ 
*"
+                                      value)
+                         (string-match "\\`header-args\\(?::\\(\\S-+\\)\\)? *"
+                                      value))
                 (funcall verify
                          datum
                          (match-string 1 value)
@@ -1076,8 +1078,10 @@ Use \"export %s\" instead"
          (`node-property
           (let ((key (org-element-property :key datum)))
             (when (let ((case-fold-search t))
-                    (string-match "\\`HEADER-ARGS\\(?::\\(\\S-+\\)\\)?\\+?"
-                                  key))
+                    (or (string-match "\\`HEADER-ARGS\\(?::\\(\\S-+\\)\\)?\\+"
+                                      key)
+                         (string-match "\\`HEADER-ARGS\\(?::\\(\\S-+\\)\\)?"
+                                      key)))
               (funcall verify
                        datum
                        (match-string 1 key)

Reply via email to