forked from mirrors/org-mode
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:
parent
e401ec09ec
commit
5a24ffe004
|
@ -1214,9 +1214,9 @@ and `:post-blank' keywords."
|
||||||
(contents-begin
|
(contents-begin
|
||||||
(re-search-backward
|
(re-search-backward
|
||||||
(concat "^[ \t]*#\\+begin_src"
|
(concat "^[ \t]*#\\+begin_src"
|
||||||
"\\(?: +\\(\\S-+\\)\\)?" ; language
|
"\\(?: +\\(\\S-+\\)\\)?" ; language
|
||||||
"\\(?:\\( +[-+][A-Za-z]\\)+\\)?" ; switches
|
"\\(\\(?: +[-+][A-Za-z]\\)*\\)" ; switches
|
||||||
"\\(.*\\)[ \t]*$") ; arguments
|
"\\(.*\\)[ \t]*$") ; arguments
|
||||||
nil t))
|
nil t))
|
||||||
;; Get language as a string.
|
;; Get language as a string.
|
||||||
(language (org-match-string-no-properties 1))
|
(language (org-match-string-no-properties 1))
|
||||||
|
|
Loading…
Reference in New Issue