1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-12-26 10:49:38 +00:00

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

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