Skip to content

[2.9.2] Regression adding a needless new line #887

@boris-petrov

Description

@boris-petrov

Prettier-Java 2.9.2

Playground link

--print-width 200

Input:

return foo(
    a.getOrDefault("b", a.get("c")) // handle
);

Output:

return foo(
	a
		.getOrDefault("b", a.get("c")) // handle
);

Expected behavior:

return foo(
    a.getOrDefault("b", a.get("c")) // handle
);

Prettier for JavaScript does the right thing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions