String
concatenations that can be simplified by replacing them with text blocks.
Requirements:
\n
occurs two or more times.Use the Report single string literals option to highlight single literals containing line breaks. The quick-fix will still be available even when this option is disabled.
Example:
String html = "<html>\n" +
" <body>\n" +
" <p>Hello, world</p>\n" +
" </body>\n" +
"</html>\n";
After the quick-fix is applied:
String html = """
<html>
<body>
<p>Hello, world</p>
</body>
</html>
""";
New in 2019.3