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

Don't add blank lines after comments in inherit #379

Merged
merged 1 commit into from
Feb 22, 2023

Conversation

9999years
Copy link
Contributor

@9999years 9999years commented Feb 22, 2023

Fixes #376

Note that handling of extra newlines in inherit statements is still a little janky; usually blank lines will be removed from formatted output, but in some cases (e.g. between an end-of-line comment and a full-line comment) they will be preserved. See the tests added for a few examples of this.

It's probably a good idea to take a position on this (I lean towards collapsing multiple consecutive blank lines into one blank line, but otherwise not removing them from the output) and add it to STYLE.md at some point, but that's out-of-scope for this PR. (I didn't want to change the way we format the existing test-cases except to remove trailing whitespace.)

Fixes kamadorueda#376

Note that handling of extra newlines in `inherit` statements is still a
little janky; usually blank lines will be removed from formatted output,
but in some cases (e.g. between an end-of-line comment and a full-line
comment) they will be preserved. See the tests added for a few examples
of this.
@kamadorueda kamadorueda merged commit a7005b0 into kamadorueda:main Feb 22, 2023
@9999years 9999years deleted the trailing-space branch February 22, 2023 20:17
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

Successfully merging this pull request may close these issues.

Alejandra inserts blank line after comment in inherit statement
2 participants