Open BoPeng opened 4 years ago
FYI, nbsphinx
handles blank lines correctly, see e.g. https://nbsphinx.readthedocs.io/en/0.6.0/code-cells.html.
I'm not sure why the code cells are manipulated here, thanks for raising the issue. I'll tag it for 6.0 and see if we can get it fixed by then.
When a code cell has a leading newline, nbconvert strips it.
Create a notebook with a single Python cell
convert to HTML and the first line is gone.
In my particular kernel, the leading newlines are significant so the automatic removal of the leading newlines caused some confusion. My understanding is that
nbconvert
should convert lines in code cells faithfully.test_space.txt
Nbconvert version: nbconvert 5.6.1