Skip to content

Commit

Permalink
Don't trim whitespace at beginning of cell code in the REPL
Browse files Browse the repository at this point in the history
Co-authored-by: Elliott Gordon-Rodriguez <[email protected]>
Co-authored-by: matteha <[email protected]>

closes #252
closes #280

* jupyter-repl.el (jupyter-repl-execute-cell): Do it.
  • Loading branch information
nnicandro committed Dec 2, 2024
1 parent 5773717 commit d06b291
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jupyter-repl.el
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d06b291

Please sign in to comment.