[jOOQ/jOOQ#14141] Generated text blocks for view sources should escape backslashes
This commit is contained in:
parent
5bed0b0e88
commit
157f822e7b
@ -7272,11 +7272,18 @@ public class JavaGenerator extends AbstractGenerator {
|
||||
}
|
||||
|
||||
// [#9817] Generate text blocks only if there are newlines or quotes
|
||||
else if (generateTextBlocks0() && (string.contains("\n") || string.contains("\r") || string.contains("\""))) {
|
||||
else if (generateTextBlocks0() && (
|
||||
string.contains("\\")
|
||||
|| string.contains("\n")
|
||||
|| string.contains("\r")
|
||||
|| string.contains("\"")
|
||||
)) {
|
||||
// TODO [#3450] Escape sequences?
|
||||
// TODO [#10007] [#10318] Long textblocks?
|
||||
// TODO [#10869] String interpolation in kotlin?
|
||||
String result = string.replace("\"\"\"", "\\\"\\\"\\\"");
|
||||
String result = string
|
||||
.replace("\\", "\\\\")
|
||||
.replace("\"\"\"", "\\\"\\\"\\\"");
|
||||
|
||||
|
||||
// Only Java has incidental whitespace support (?)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user