Skip to content

File endings converted on Windows from CRLF to LF #202

Description

@varunsh-xilinx

With nbstripout, given a Jupyter notebook with CRLF endings on Windows:

nbstripout ./my_windows_file.ipynb

results in a zero return code but the working file has been updated on disk to have unix-style LF endings.

One fix I found was to remove the newline = '' setting here which seems to corrupt the output. Removing this results in the saved file continuing to have CRLF file endings and the return code is still 0. Removing the explicit newline arg allows Python to save the file with the OS native endings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions