Preserve CRLF line endings#606
Open
jdalton wants to merge 1 commit intocsscomb:devfrom
jdalton:eol-crlf
Open
Conversation
tonyganch
reviewed
May 19, 2019
|
|
||
| // Do not continue if there is no line break: | ||
| if (lastIndex < 0) return; | ||
| if (lastIndex === -1) return; |
Member
There was a problem hiding this comment.
@jdalton, out of curiosity, there'll be no bug/issue with this line, it's just a nitpick, right?
Contributor
Author
There was a problem hiding this comment.
Ah, sorry about that. No bug. I usually try to avoid unfocused changes like that.
Let me know if you spot others like it and I’ll revert them.
Member
|
@jdalton, is this PR still WIP? |
Contributor
Author
Yes! I still need add detection of newline use based on the nearest other newline instead of using ‘os.EOL’. Update: I'm getting closer. I've added a |
|
Please tell me what's wrong with this edit? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR preserves CRLF line endings and addresses #367, #498, #572, #578, #592, #593.
Update:
Still needs tests.
Update:
I'm manually testing on Windows and finding some issues with this PR.
I'll update as I resolve them 👷
Update:
I'll add logic to detect existing line endings used to avoid using
os.EOLin certain situations.