-
Notifications
You must be signed in to change notification settings - Fork 450
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
atom-beautify does not support js-beautify eol auto setting #829
Comments
Sounds like Atom Beautify is working exactly as expected, passing options to js-beautify. The more I read, the more it is clear to me that this is a js-beautify bug, regarding how js-beautify is handling the option Have you tried what was recommended at beautifier/js-beautify#829 (comment) ?
Also for this and future issues please provide the debugging information in a Gist as instructed by https://github.com/Glavin001/atom-beautify/blob/master/ISSUE_TEMPLATE.md#how-to-create-debugmd-gist |
What can be done is adding official support in Atom Beautify for:
However, this is all above and beyond the fact that:
I recommend the following actions:
After the above have been completed, I can then continue investigating Atom Beautify internally for why this issue may be occurring. Thanks. |
@Glavin001 Yes, for Pretty Diff eol support use the option http://prettydiff.com/documentation.xhtml#crlf The value |
Yes, it does seem like that, and I'm sorry to have bothered you with it. I only brought it up here because I was assured on the other side that there was no problem in js-beautify and it absolutely had to be an atom-beautify problem. I hope I can help you with other areas of atom-beautify in the future. |
@garretwilson - 23 days ago I said:
And instead of doing that, you filed this issue with atom-beautify. If you'd simply done as I'd asked at the time, you would have saved yourself and others a lot of time and frustration. |
Description
js-beautify in its latest version supports the value
"auto"
for theeol
setting. In auto-eol mode, js-beautify purports to auto-detect the line ending style (e.g. LF or CRLF) and maintain that style. (I have not verified this new functionality, but @bitwiseman assures me that it is working in the latest release:beautifier/js-beautify#829
However I cannot get it to work in atom-beautify. @Glavin001 assures me that atom-beautify is using the latest js-beautify, and that my problem probably stems from an outdated js-beautify, and that I should simply reinstall atom-beautify.
So I uninstalled and re-installed atom-beautify. I'm running a fresh version 0.28.22. Still no luck.
Steps to Reproduce
I started with the following
.jsbeautifyrc
file:Pressing
Ctrl+Alt+B
formatted that using CRLF as a line ending, just as I had requested. So, just to be sure that atom-beautify was picking up the correct.jsbeautifyrc
file, I changedeol
to"\n"
:Sure enough, now atom-beautify uses LF instead of CRLF when formatting my file---so I know I'm working with the correct
.jsbeautifyrc
file.So I remove the
eol
setting altogether; if I understand @bitwiseman and @Glavin001 , atom-beautify should pass everything to js-beautify, and js-beautify should detect the line endings.But no go. I get LF line endings, just like atom-beautify+js-beautify used to do. Apparently nothing has changed.
Trying to further investigate this, I changed the
eol
setting to"auto"
. Surely this can't go wrong!You know what happens? It uses the literal string
"auto"
for my line endings! Yes, that produces a single line with"auto"
interspersed throughout!!The text was updated successfully, but these errors were encountered: