From d97f767632e68b6ad7078b57fd9ca470e574d03f Mon Sep 17 00:00:00 2001 From: Dan Davison Date: Sat, 31 Oct 2009 13:51:55 -0400 Subject: [PATCH] org-babel: avoid inserting blank line at bottom of exported code blocks --- contrib/babel/lisp/org-babel-exp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/babel/lisp/org-babel-exp.el b/contrib/babel/lisp/org-babel-exp.el index 99869b346..8093f392e 100644 --- a/contrib/babel/lisp/org-babel-exp.el +++ b/contrib/babel/lisp/org-babel-exp.el @@ -121,7 +121,7 @@ options are taken from `org-babel-default-header-args'." (switches (fourth info))) (case type ('inline (format "=%s=" (second info))) - ('block (format "#+BEGIN_SRC %s %s\n%s%s\n#+END_SRC" lang switches body + ('block (format "#+BEGIN_SRC %s %s\n%s%s#+END_SRC" lang switches body (if (string-match "\n$" body) "" "\n"))) ('lob (save-excursion (re-search-backward org-babel-lob-one-liner-regexp)