summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2011-02-27 14:38:58 -0700
committerEric Schulte <schulte.eric@gmail.com>2011-02-27 14:38:58 -0700
commitd0a93cee3795394d327c365fd391ef9784d5b1f3 (patch)
treee84cb1e6e1ff09799e36f04b16c3274522eb9659
parentcfcf493c2903ecdfc1b77d2695add34fc64a7a23 (diff)
downloadorg-mode-d0a93cee3795394d327c365fd391ef9784d5b1f3.tar.gz
ob: code block regexp now matches blocks with empty bodies
Thanks to Martyn Jago for this patch * lisp/ob.el (org-babel-src-block-regexp): Code block regexp now matches blocks with empty bodies.
-rw-r--r--lisp/ob.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/ob.el b/lisp/ob.el
index 36440c2..8633b73 100644
--- a/lisp/ob.el
+++ b/lisp/ob.el
@@ -131,14 +131,14 @@ remove code block execution from the C-c C-c keybinding."
(defvar org-babel-src-block-regexp
(concat
- ;; (1) indentation (2) lang
+ ;; (1) indentation (2) lang
"^\\([ \t]*\\)#\\+begin_src[ \t]+\\([^ \f\t\n\r\v]+\\)[ \t]*"
;; (3) switches
"\\([^\":\n]*\"[^\"\n*]*\"[^\":\n]*\\|[^\":\n]*\\)"
;; (4) header arguments
"\\([^\n]*\\)\n"
;; (5) body
- "\\([^\000]+?\n\\)[ \t]*#\\+end_src")
+ "\\([^\000]*?\n*\\)[ \t]*#\\+end_src")
"Regexp used to identify code blocks.")
(defvar org-babel-inline-src-block-regexp