Skip to content

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

Open
@parlough

Description

@parlough

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');
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions