Browse Source

org-element: Fix parsing of src-block switches when there is more than one

* contrib/lisp/org-element.el (org-element-src-block-parser): Previous
  regexp would only get the last switch if more than one were
  provided.
Nicolas Goaziou 13 years ago
parent
commit
5a24ffe004
1 changed files with 3 additions and 3 deletions
  1. 3 3
      contrib/lisp/org-element.el

+ 3 - 3
contrib/lisp/org-element.el

@@ -1214,9 +1214,9 @@ and `:post-blank' keywords."
            (contents-begin
             (re-search-backward
              (concat "^[ \t]*#\\+begin_src"
-                     "\\(?: +\\(\\S-+\\)\\)?"         ; language
-                     "\\(?:\\( +[-+][A-Za-z]\\)+\\)?" ; switches
-                     "\\(.*\\)[ \t]*$")               ; arguments
+                     "\\(?: +\\(\\S-+\\)\\)?"	     ; language
+                     "\\(\\(?: +[-+][A-Za-z]\\)*\\)" ; switches
+                     "\\(.*\\)[ \t]*$")		     ; arguments
              nil t))
            ;; Get language as a string.
            (language (org-match-string-no-properties 1))