-
Notifications
You must be signed in to change notification settings - Fork 586
Open
Labels
format:Notebookpertains to exporting to the Notebook formatpertains to exporting to the Notebook format
Milestone
Description
On Windows, when I run
jupyter nbconvert --to notebook --execute --inplace "Untitled25.ipynb"
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
tadeu
Metadata
Metadata
Assignees
Labels
format:Notebookpertains to exporting to the Notebook formatpertains to exporting to the Notebook format
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
mydmdm commentedon Sep 3, 2019
same issue, I write a script to clear cell outputs before committing for security, but the command
changes the line ending
MSeal commentedon Sep 4, 2019
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.
mydmdm commentedon Sep 5, 2019
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?)
MSeal commentedon Sep 5, 2019
Yes. I believe it is auto atm. I'd also be ok changing the default to
LF
in the 6.x branch if we wanted as conforming to other notebook executions might be nice and the major change is easy to justify default changes.jamesmyatt commentedon Jun 8, 2020
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.
MSeal commentedon Jun 9, 2020
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.
auxym commentedon Dec 13, 2021
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?