-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Format cell adds blank line at the end #18121
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
Comments
Maybe it's not that a blank line is added at the end but that a newline is added to the last line. Anyway, that might be ok for a python file but it's undesirable for a cell, it's a lot of wasted space having what, at least visually, is a blank line in each cell of a notebook. |
Cell formatting is actually handled by the python extension (cells are considered python documents). Transferring issue there. |
I don't think that approach would work OOTB, I've seen problems with it in Jupyter Lab extensions as well, cells have their own quirks, for example you don't want a newline at the end of a cell. |
Perhaps one should use a formatter that supports selection format, instead of black (as in my case). |
This should be handled when we move formatting over LSP. Closing in favor of #17918 |
Environment data
Expected behaviour
If I format a cell using black no blank line is added at the end of the cell.
Actual behaviour
A blank line is added at the end of the cell.
Steps to reproduce:
[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]
x = 1
as content.The text was updated successfully, but these errors were encountered: