# HG changeset patch # User František Kučera # Date 1388866848 -3600 # Node ID f785ee7a70a25a2fc49a35054d52e775876b06cc # Parent 347a7dd94a3fd61469b6c85cfafabcf7204aefd1 XML formatter fix: line breaks at the end of the text will be eaten – if you need them, use indentText = false diff -r 347a7dd94a3f -r f785ee7a70a2 java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractXmlFormatter.java --- a/java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractXmlFormatter.java Sat Jan 04 20:24:27 2014 +0100 +++ b/java/sql-dk/src/info/globalcode/sql/dk/formatting/AbstractXmlFormatter.java Sat Jan 04 21:20:48 2014 +0100 @@ -142,7 +142,11 @@ /* * line breaks at the end of the text will be eaten – if you need them, use indentText = false */ - printText(lines[0], false); + if (lines.length == 1 && text.endsWith("\n")) { + text = text.substring(0, text.length() - 1); + } + + printText(text, false); printEndElement(false); } }