Skip to content
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

Space-only lines in multi-line comments #314

Closed
sigprof opened this issue Jul 1, 2022 · 1 comment
Closed

Space-only lines in multi-line comments #314

sigprof opened this issue Jul 1, 2022 · 1 comment

Comments

@sigprof
Copy link

sigprof commented Jul 1, 2022

Alejandra 1.5.0 adds spaces to all lines inside multi-line comments, including empty lines:

{
  /*
   This is a comment.
   
   This is the second paragraph of the comment.
   */
}

This may not be apparent unless you select the text, but the “empty” line in the middle of the comment actually contains 3 spaces after formatting. Such lines are considered to be suspicious by many tools (e.g., even git diff highlights them as whitespace errors).

Maybe Alejandra should leave such lines completely empty instead of adding whitespace-only lines to the code?

@kamadorueda
Copy link
Owner

Fixed in #324, thanks @blaggacao

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants