Repository navigation
Conversation
|
This is intended behavior. |
|
I might be missing something, but is there any reason why this is the expected behavior? Formatters usually normalize extra (or missing) trailing newlines. |
This is markup, not code in the general sense. Blank lines can be intentional. As long as we preserve newlines in the body, the ending should be no exception. Of course, we could have an option to control the behavior. But by default, we tend to preserve. You can still turn on the trimming option in VSCode if you like, as an alternative. |
|
That's fine. If you think it's reasonable, I can implement a |
Summary
This PR ensures that formatted files end with exactly one newline.
Changes
Testing
Compiled and ran the binary on files with no trailing newlines and with multiple trailing newlines. Also ran the unit tests; all of them passed successfully.