summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <eric.schulte@gmx.com>2012-04-23 11:39:28 -0400
committerEric Schulte <eric.schulte@gmx.com>2012-04-23 11:39:28 -0400
commitcd080b025a47eb8cf89497294c62e6740f4094fb (patch)
tree853b359ea994f56201456fc8a09c967ea63c13a2
parent805f3fd92d1eff8d3266f443442a8b0025451897 (diff)
downloadorg-mode-cd080b025a47eb8cf89497294c62e6740f4094fb.tar.gz
ensure newline precedes automatically-added returns for Python code blocks
* lisp/ob-python.el (org-babel-execute:python): Ensure newline precedes automatically-added returns.
-rw-r--r--lisp/ob-python.el2
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 0dc744a..348248f 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -64,7 +64,7 @@ This function is called by `org-babel-execute-src-block'."
(preamble (cdr (assoc :preamble params)))
(full-body
(org-babel-expand-body:generic
- (concat body (if return-val (format "return %s" return-val) ""))
+ (concat body (if return-val (format "\nreturn %s" return-val) ""))
params (org-babel-variable-assignments:python params)))
(result (org-babel-python-evaluate
session full-body result-type result-params preamble)))