Skip to content

[2.9.2] Regression with comment placement at the end of a line #883

@boris-petrov

Description

@boris-petrov

Prettier-Java 2.9.2

Playground link

Prettier for JS

--print-width 100

Input:

var search = a
	.b()
	.c() // found by inverting `RelevanceScore.fromCosineSimilarity`
	.d();

Output:

var search =
	a
		.b()
		.c()
		// found by inverting `RelevanceScore.fromCosineSimilarity`
		.d();

Expected behavior:

var search =
	a
		.b()
		.c() // found by inverting `RelevanceScore.fromCosineSimilarity`
		.d();

Also, note that this also differs from Prettier for JS in the placement of a but I don't know if that's a bug.

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