From 4464a33d9ca54af36ae7a3670273f1445a96425b Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Sat, 30 Jul 2011 18:29:20 +0200 Subject: [PATCH] Fix regexp for finding code blocks --- lisp/org/ChangeLog | 5 +++++ lisp/org/ob.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/org/ChangeLog b/lisp/org/ChangeLog index 0822f313ac4..43e4ad30e06 100644 --- a/lisp/org/ChangeLog +++ b/lisp/org/ChangeLog @@ -1,3 +1,8 @@ +2011-07-30 Carsten Dominik + + * ob.el (org-babel-src-block-regexp): If a code block has a body, + its last character must be a newline. + 2011-07-28 Bastien Guerry * org-publish.el (org-publish-index-generate-theindex): rename diff --git a/lisp/org/ob.el b/lisp/org/ob.el index 0de0aa661c5..44173fdb789 100644 --- a/lisp/org/ob.el +++ b/lisp/org/ob.el @@ -137,7 +137,7 @@ remove code block execution from the C-c C-c keybinding." ;; (4) header arguments "\\([^\n]*\\)\n" ;; (5) body - "\\([^\000]*?\\)[ \t]*#\\+end_src") + "\\([^\000]*?\n\\)?[ \t]*#\\+end_src") "Regexp used to identify code blocks.") (defvar org-babel-inline-src-block-regexp -- 2.39.2