Skip to content

Commit 1c6ed77

Browse files
author
bentmann
committed
[PLXUTILS-68] Improve pretty printing done by MXSerializer
1 parent 9c3be19 commit 1c6ed77

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/java/org/codehaus/plexus/util/xml/pull/MXSerializer.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ public void startDocument (String encoding, Boolean standalone) throws IOExcepti
391391
// }
392392
}
393393
out.write("?>");
394+
if(writeLineSepartor) {
395+
out.write(lineSeparator);
396+
}
394397
}
395398

396399
public void endDocument() throws IOException
@@ -399,6 +402,9 @@ public void endDocument() throws IOException
399402
while(depth > 0) {
400403
endTag(elNamespace[ depth ], elName[ depth ]);
401404
}
405+
if(writeLineSepartor) {
406+
out.write(lineSeparator);
407+
}
402408
//assert depth == 0;
403409
//assert startTagIncomplete == false;
404410
finished = pastRoot = startTagIncomplete = true;
@@ -1109,3 +1115,4 @@ private static void addPrintable(StringBuffer retval, char ch)
11091115

11101116
}
11111117

1118+

0 commit comments

Comments
 (0)