Skip to content

[2.10.0] Deletes real code in seeming attempt to remove parentheses near comments #949

Closed

Description

@ZachCallear

Prettier-Java 2.10.0

Input:

var test =
    something +
    555 + // This is a comment that continues onto
    (// the next line in an odd way.
      "very important information") +
    something2;

Output:

var test =
  something +
  555 + // This is a comment that continues onto
  // the next line in an odd way.
   +
  something2;

Expected behavior:

The "very important information" string should not be deleted.

Notes:

Activity

  1. changed the title [-][2.10.0] Deletes real code in seeming attempt to remove parenthesis around comments[/-] [+][2.10.0] Deletes real code in seeming attempt to remove parentheses near comments[/+] on Jun 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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