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

New line shouldn't be inserted before comment following last block #1644

Open
parlough opened this issue Feb 10, 2025 · 0 comments
Open

New line shouldn't be inserted before comment following last block #1644

parlough opened this issue Feb 10, 2025 · 0 comments

Comments

@parlough
Copy link
Member

Language version: 3.7
SDK version: 3.7.0-323.2.beta and 3.8.0-70.0.dev
Page width: Default (80)


If I format a file with the following content, a new line is added before the comment.

void main() {
  print('Printing');
}
// Something.

Results in:

void main() {
  print('Printing');
}

// Something.

This doesn't happen for comments after earlier blocks. For example, the following doesn't change (as I'd expect).

void main() {
  f();
}
// Something.

void f() {
  print('Printing');
}
@munificent munificent changed the title [Tall style] New line shouldn't be inserted before comment following last block New line shouldn't be inserted before comment following last block Feb 14, 2025
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

1 participant