Skip to content

Wrong line wrapping when Binary expression doesn't have the parent grouping #1740

Open
@xixiaofinland

Description

@xixiaofinland

Initial Apex code

class HelloWorld {
  {
    b > 1 && c > 1;
  }
}

Formatted Apex code

class HelloWorld {
  {
    b > 1 &&
    c > 1;
  }
}

Expected Apex code

class HelloWorld {
  {
    b > 1 && c > 1;
  }
}

Prettier options (if any)

No response

Playground link

https://apex.dangmai.net/#N4Ig9gDgLglmB2BnEAuUEwCcqoCy4GYAaEACzERxRAEMIBTADwFobKA6BTe+AE3szsAxmAC2IEhExgoYEQBtUZKFAjJJNTIgFK6TCSCkx4UAOoxeUUqgAcABhJQaAI3OXrKAEwkArtoAqLsgoAGY08tokeowAkkgCUABixuEAcvQA7vLG9KhQmD70AL4kIvxKQvJsiAAEABL08vJgpljyvDXAADrwNZ09fX3ONQB8NQCMNQBkUzVCoxMA3AM1RT1r8CBFQA

System Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions