We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Heyo, we've run into an odd formatting glitch that causes huge git diffs in combination with VS Code's LF/CRLF setting.
In this example file, we have CRLFs present in the comment but LFs everywhere else (as created by StyLua, using the default config):
Copy these hex bytes for a simple test case (CRLF/LF distinction):
0D 0A 2D 2D 5B 5B 0D 0A 20 20 20 20 20 20 74 65 73 74 0D 0A 20 20 20 20 20 20 2D 2D 20 61 73 64 66 0D 0A 20 20 5D 5D 0D 0A
After running StyLua on this CRLF-based file, all CRLFs in the regular code are correctly turned into LF, but those in the comment are not:
Again, the hex bytes show that this is the case:
0A 2D 2D 5B 5B 0D 0A 20 20 20 20 20 20 74 65 73 74 0D 0A 20 20 20 20 20 20 2D 2D 20 61 73 64 66 0D 0A 20 20 5D 5D 0A
I would expect all line endings to be consistent after running the formatter, which is is preferable to ugly hacks like autocrlf:
autocrlf
Expected hex bytes:
0A 2D 2D 5B 5B 0A 20 20 20 20 20 20 74 65 73 74 0A 20 20 20 20 20 20 2D 2D 20 61 73 64 66 0A 20 20 5D 5D 0A
I don't know Rust at all so I can't contribute a fix, but feel free to use the above as a test case if this is unintended :)
The text was updated successfully, but these errors were encountered:
Definitely unintended, let me take a look. Thanks for the report!
Sorry, something went wrong.
This has been fixed and is available in v0.17.1
Successfully merging a pull request may close this issue.
Heyo, we've run into an odd formatting glitch that causes huge git diffs in combination with VS Code's LF/CRLF setting.
In this example file, we have CRLFs present in the comment but LFs everywhere else (as created by StyLua, using the default config):
Copy these hex bytes for a simple test case (CRLF/LF distinction):
After running StyLua on this CRLF-based file, all CRLFs in the regular code are correctly turned into LF, but those in the comment are not:
Again, the hex bytes show that this is the case:
I would expect all line endings to be consistent after running the formatter, which is is preferable to ugly hacks like
autocrlf
:Expected hex bytes:
I don't know Rust at all so I can't contribute a fix, but feel free to use the above as a test case if this is unintended :)
The text was updated successfully, but these errors were encountered: