-
Notifications
You must be signed in to change notification settings - Fork 569
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
nbconvert to notebook doesn't respect line endings #1062
Comments
same issue, I write a script to clear cell outputs before committing for security, but the command
changes the line ending |
If we change this behavior we should leave a flag to preserve system line-endings. I'd be ok with someone making that change so long as it could be opt-ed out of. There's sometimes system specific actions that complain when line-endings don't match the system but most modern windows applications and tools handle it smoothly now-a-days. |
Maybe a option flag to let user select line ending among
Agreed that the default value of such flag would preserve the current behavior (now is auto?) |
Yes. I believe it is auto atm. I'd also be ok changing the default to |
The default should be the same as the Jupyter notebook or lab editors. It's a mistake that it's not the same and I can't imagine how anyone would be happy that the line endings change. I'm happy for it to be an option, but the default should be the one the creates the least issues. If no-one has raised this as an issue before, then it's probably because they're not looking. Sorry to be a bit :grrr: but LF line endings on Windows hasn't been an issue for years, and especially not for anything or anyone that would consume an ipynb file. |
I added it to the 6.0 milestone -- could use some extra contributors helping get small issues like these moved across the finish line before the last major issues get resolved. |
Hi, any update on this? I'm running nbconvert 6.0.0 and still experiencing the issue. Is the fix included in a more recent version? |
On Windows, when I run
it uses CRLF line endings, but when when I open and save it directly via Jupyter notebook or Jupyterlab it always saves with LF line endings.
I think that the best solution would be to match the behaviour of Jupyter notebook, i.e. replace the line endings with LF. Alternatively, it should maintain the existing line endings, rather than (presumably) always using "native".
nbconvert 5.5.0, notebook 5.7.8, pandoc 2.7.3, juptyerlab 1.0.1
The text was updated successfully, but these errors were encountered: