Closed
Description
Prettier-Java 2.6.5
# Options (if any):
--print-width 140
--tab-width 4
Description
When length of the text in a line is exactly printWidth + 1
and text ends with multiple parentheses then inner block is not moved to a new line.
Input:
// code snippet
public class PrettierSample {
private void singleEndingBracketInNewLine() {
Stream.of("some string")
.filter(s -> s.substring(1).startsWith("exactlyPrintWidthPlusOneIsThisLineCompleteWidthAndLineEndsWithMultipleParentheses12345"))
.forEach(System.out::println);
}
}
Output:
// code snippet
public class PrettierSample {
private void singleEndingBracketInNewLine() {
Stream.of("some string")
.filter(s -> s.substring(1).startsWith("exactlyPrintWidthPlusOneIsThisLineCompleteWidthAndLineEndsWithMultipleParentheses12345")
)
.forEach(System.out::println);
}
}
Expected behavior:
// code snippet
public class PrettierSample {
private void singleEndingBracketInNewLine() {
Stream.of("some string")
.filter(s ->
s.substring(1).startsWith("exactlyPrintWidthPlusOneIsThisLineCompleteWidthAndLineEndsWithMultipleParentheses12345")
)
.forEach(System.out::println);
}
}
Metadata
Metadata
Assignees
Labels
No labels