New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate InputSplitter for transforming whole cells #3203
Conversation
* input_splitter is used to detect when a cell is complete * input_transformer_manager transforms completed cells Closes ipythongh-3178
I'm going to be away for a couple of days, so if this needs any changes, I'll get onto them when I'm back. But I've verified that it fixes the issue with cell magics containing blank lines. |
Is there a test for the regression? I don't see a test for a cell magic with an empty line. |
The modified CellModeCellMagics test case covers this in a slightly On 20 April 2013 20:34, Min RK notifications@github.com wrote:
|
This fixes the problem for me, see gist on nbviewer, thanks for the fast fix! |
Since this is important and looks clean enough, I will go ahead and merge. We can add more tests in a later PR. |
Separate InputSplitter for transforming whole cells This allows cell magics to include blank lines once again (closes #3178). InteractiveShell now has two input splitters: - `input_splitter` is used to determine when a block of input is complete, so you can use a cell magic in the terminal by leaving a blank line at the end. - `input_transformer_manager` is used to transform whole cells, so cell magics affect the whole of their cell. I removed the similar concept of 'input modes' for InputSplitter, because it was bound to get conflated, and it made the code rather hard to follow.
Separate InputSplitter for transforming whole cells This allows cell magics to include blank lines once again (closes ipython#3178). InteractiveShell now has two input splitters: - `input_splitter` is used to determine when a block of input is complete, so you can use a cell magic in the terminal by leaving a blank line at the end. - `input_transformer_manager` is used to transform whole cells, so cell magics affect the whole of their cell. I removed the similar concept of 'input modes' for InputSplitter, because it was bound to get conflated, and it made the code rather hard to follow.
This allows cell magics to include blank lines once again (#3178).
InteractiveShell now has two input splitters:
input_splitter
is used to determine when a block of input is complete, so you can use a cell magic in the terminal by leaving a blank line at the end.input_transformer_manager
is used to transform whole cells, so cell magics affect the whole of their cell.I removed the similar concept of 'input modes' for InputSplitter, because it was bound to get conflated, and it made the code rather hard to follow.