ensure newline precedes automatically-added returns for Python code blocks

* lisp/ob-python.el (org-babel-execute:python): Ensure newline
  precedes automatically-added returns.
This commit is contained in:
Eric Schulte 2012-04-23 11:39:28 -04:00
parent 805f3fd92d
commit cd080b025a
1 changed files with 1 additions and 1 deletions

View File

@ -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)))