From d06b2912a2a839ac12f265756965f8d89a7e1d35 Mon Sep 17 00:00:00 2001 From: Nathaniel Nicandro Date: Mon, 2 Dec 2024 04:21:06 -0600 Subject: [PATCH] Don't trim whitespace at beginning of cell code in the REPL Co-authored-by: Elliott Gordon-Rodriguez Co-authored-by: matteha closes #252 closes #280 * jupyter-repl.el (jupyter-repl-execute-cell): Do it. --- jupyter-repl.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jupyter-repl.el b/jupyter-repl.el index c68e731e..7ba27740 100644 --- a/jupyter-repl.el +++ b/jupyter-repl.el @@ -833,7 +833,7 @@ Return the `jupyter-request' representing the executed code." (save-excursion (goto-char (jupyter-repl-cell-code-beginning-position)) (run-hooks 'jupyter-repl-cell-pre-send-hook)) - (let ((code (string-trim (jupyter-repl-cell-code)))) + (let ((code (string-trim (jupyter-repl-cell-code) "[\r\n]+"))) (jupyter-run-with-client client (jupyter-mlet* ((req (jupyter-execute-request :code code