--- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java Sat Jan 31 23:40:31 2015 +0100
+++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/TabularFormatter.java Sun Feb 01 00:03:40 2015 +0100
@@ -27,10 +27,14 @@
import java.util.regex.Pattern;
/**
- * <p>Prints human-readable output – tables of result sets and text messages with update counts.</p>
+ * <p>
+ * Prints human-readable output – tables of result sets and text messages with update counts.
+ * </p>
*
- * <p>Longer values might break the table – overflow the cells – see alternative tabular formatters
- * and the {@linkplain #PROPERTY_TRIM} property.</p>
+ * <p>
+ * Longer values might break the table – overflow the cells – see alternative tabular formatters
+ * and the {@linkplain #PROPERTY_TRIM} property.
+ * </p>
*
* @author Ing. František Kučera (frantovo.cz)
* @see TabularPrefetchingFormatter
@@ -45,7 +49,7 @@
public static final String PROPERTY_COLORFUL = "color";
public static final String PROPERTY_TRIM = "trim";
private static final String NBSP = " ";
- private static final Pattern whitespaceToReplace = Pattern.compile("\\n|\\t|" + NBSP);
+ private static final Pattern whitespaceToReplace = Pattern.compile("\\n|\\r|\\t|" + NBSP);
protected ColorfulPrintWriter out;
private boolean firstResult = true;
private int[] columnWidth;
@@ -282,6 +286,9 @@
case "\n":
out.print(TerminalColor.Red, "↲");
break;
+ case "\r":
+ out.print(TerminalColor.Red, "⏎");
+ break;
case "\t":
out.print(TerminalColor.Red, "↹");
break;