Closed TysonMN closed 1 year ago
Prettier-Java 2.1.0
Here is the contents of our .prettierrc.json file.
.prettierrc.json
{ "arrowParens": "avoid", "bracketSameLine": true, "bracketSpacing": false, "proseWrap": "always", "printWidth": 120, "trailingComma": "all" }
Input:
The following text block has three lines and each line has three characters. All three characters in the middle line are spaces.
String myTextBlock = """ foo bar """;
Output:
The following text block has three lines. The first and last liens both have three characters. The middle lines has no characters.
Expected behavior:
I expected the output to be the same as the input. In particular, prettier should not change the value of any string literal.
prettier
Ah, sorry. We realized that IntelliJ is to blame for this: https://youtrack.jetbrains.com/issue/IDEA-246734/trim-trailing-whitespace-should-not-apply-inside-multiline-strings
Prettier-Java 2.1.0
Here is the contents of our
.prettierrc.json
file.Input:
The following text block has three lines and each line has three characters. All three characters in the middle line are spaces.
Output:
The following text block has three lines. The first and last liens both have three characters. The middle lines has no characters.
Expected behavior:
I expected the output to be the same as the input. In particular,
prettier
should not change the value of any string literal.