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.
This commit is contained in:
Nicolas Goaziou 2011-11-24 14:29:53 +01:00
parent e401ec09ec
commit 5a24ffe004
1 changed files with 3 additions and 3 deletions

View File

@ -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))