File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ String message =
29
29
30
30
## Trailing newlines
31
31
32
- If the string should not contain a trailing newline, use a ` \ ` to escape the
32
+ If the string should not contain a trailing newline, use a ' \' to escape the
33
33
final newline in the text block. That is, these two strings are equivalent:
34
34
35
35
``` java
@@ -46,11 +46,11 @@ String s =
46
46
47
47
The suggested fixes for this check preserve the exact contents of the original
48
48
string, so if the original string doesn't include a trailing newline the fix
49
- will use a ` \ ` to escape the last newline.
49
+ will use a ' \' to escape the last newline.
50
50
51
51
If the whitespace in the string isn't significant, for example because the
52
52
string value will be parsed by a parser that doesn't care about the trailing
53
- newlines, consider removing the final ` \ ` to improve the readability of the
53
+ newlines, consider removing the final ' \' to improve the readability of the
54
54
string.
55
55
56
56
[ text blocks ] : https://docs.oracle.com/en/java/javase/23/text-blocks/index.html
You can’t perform that action at this time.
0 commit comments