Skip to content
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

Retain crlf #5622

Merged
merged 2 commits into from Nov 14, 2018
Merged

Retain crlf #5622

merged 2 commits into from Nov 14, 2018

Conversation

@ian-r-rose
Copy link
Member

@ian-r-rose ian-r-rose commented Nov 13, 2018

Fixes #3901, fixes #4464, fixes #3706.

This stores whether CRLF line endings were detected upon loading a text file in the Context. If so, it replaces them upon serialization. I considered adding CRLF vs LF knowledget to the text model, but decided that was opening us up to heartache as soon as we have multiple people collaborating on the same text model. Instead, I think it is better to standardize entirely on LF in our in-memory text models and only do the conversion upon serialization.

Currently the _useCRLF property is a private member of the Context. If we expose it, we could consider making CRLF something that we display in the status bar, as @t-makaro suggested. There was some talk in #3901 about making this user-configurable, but I think we may want to give this a shot in the wild, and see if people complain :)

Copy link
Member

@blink1073 blink1073 left a comment

Nice!

@dhirschfeld
Copy link
Member

@dhirschfeld dhirschfeld commented Nov 13, 2018

Thanks for picking this up @ian-r-rose!

@blink1073 blink1073 merged commit d2cbf6d into jupyterlab:master Nov 14, 2018
2 checks passed
@lock lock bot locked as resolved and limited conversation to collaborators Aug 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants