diff --git a/jOOQ-console/src/main/java/org/jooq/debug/console/misc/Utils.java b/jOOQ-console/src/main/java/org/jooq/debug/console/misc/Utils.java index 3ed33c7f69..facd35ab1b 100644 --- a/jOOQ-console/src/main/java/org/jooq/debug/console/misc/Utils.java +++ b/jOOQ-console/src/main/java/org/jooq/debug/console/misc/Utils.java @@ -128,31 +128,32 @@ public class Utils { String textIndent = " "; StringBuilder sb = new StringBuilder(); int charCount = text.length(); - boolean isInQuotes = false; + char quoteStart = 0; boolean isLineStart = false; String currentIndent = ""; Stack isParenthesisNewLineStack = new Stack(); for(int i = 0; i i + 1 && isKeywordStart(text.substring(i + 1).trim())) { while(text.length() > i + 1 && text.charAt(i + 1) == ' ') { i++; @@ -200,7 +201,9 @@ public class Utils { sb.append('\n'); isLineStart = true; } else { - sb.append(c); + if(text.length() > i + 1 && text.charAt(i + 1) != ' ') { + sb.append(c); + } } break; }