csscomb / csscomb.js

CSS coding style formatter
http://csscomb.com/
MIT License
3.28k stars 459 forks source link

Preserve CRLF line endings #606

Open jdalton opened 5 years ago

jdalton commented 5 years ago

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.EOL in certain situations.

tonyganch commented 5 years ago

@jdalton, is this PR still WIP?

jdalton commented 5 years ago

@tonyganch

, is this PR still WIP

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 nearestNewline() helper and got it working. I needed to feed the plugins the text, so once I clean things up and push we can bikeshed all that.

StadnikovP commented 3 years ago

Please tell me what's wrong with this edit?