diff --git a/contrib/lisp/org-element.el b/contrib/lisp/org-element.el index 09c083d32..0f469ccfc 100644 --- a/contrib/lisp/org-element.el +++ b/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))