Trivial cleanup
This commit is contained in:
parent
573446a9fa
commit
3f49bd0203
2 changed files with 4 additions and 4 deletions
|
@ -226,7 +226,7 @@ public class ModUtilities {
|
|||
StringWriter writer = new StringWriter();
|
||||
SloppyXMLOutputProcessor.sloppyPrint( mergedDoc, writer, encoding );
|
||||
String mergedString = writer.toString();
|
||||
mergedString = mergedString.replaceAll( "\r(?!\n)|(?<!\r)\n", "\r\n" ); // sloppyPrint needs normalizing!?
|
||||
mergedString = mergedString.replaceAll( "\r(?!\n)|(?<!\r)\n|\r\n", "\r\n" ); // sloppyPrint needs normalizing!?
|
||||
|
||||
InputStream result = encodeText( mergedString, encoding, mainDescription+"+"+appendDescription );
|
||||
return result;
|
||||
|
@ -260,7 +260,7 @@ public class ModUtilities {
|
|||
StringWriter writer = new StringWriter();
|
||||
SloppyXMLOutputProcessor.sloppyPrint( doc, writer, encoding );
|
||||
String resultString = writer.toString();
|
||||
resultString = resultString.replaceAll( "\r(?!\n)|(?<!\r)\n", "\r\n" ); // sloppyPrint needs normalizing!?
|
||||
resultString = resultString.replaceAll( "\r(?!\n)|(?<!\r)\n|\r\n", "\r\n" ); // sloppyPrint needs normalizing!?
|
||||
|
||||
InputStream result = encodeText( resultString, encoding, srcDescription+" (cleaned)" );
|
||||
return result;
|
||||
|
|
|
@ -337,7 +337,7 @@ public class ModXMLSandbox extends JFrame implements ActionListener {
|
|||
|
||||
StringWriter writer = new StringWriter();
|
||||
SloppyXMLOutputProcessor.sloppyPrint( mainDoc, writer, null );
|
||||
String displayedText = writer.toString().replaceAll( "\r(?!\n)|(?<!\r)\n", "\n" ); // sloppyPrint needs normalizing!?
|
||||
String displayedText = writer.toString().replaceAll( "\r(?!\n)|(?<!\r)\n|\r\n", "\n" ); // sloppyPrint needs normalizing!?
|
||||
mainArea.setText( displayedText );
|
||||
mainArea.setCaretPosition( 0 );
|
||||
areasPane.setSelectedComponent( mainScroll );
|
||||
|
@ -377,7 +377,7 @@ public class ModXMLSandbox extends JFrame implements ActionListener {
|
|||
|
||||
StringWriter writer = new StringWriter();
|
||||
SloppyXMLOutputProcessor.sloppyPrint( resultDoc, writer, null );
|
||||
String displayedText = writer.toString().replaceAll( "\r(?!\n)|(?<!\r)\n", "\n" ); // sloppyPrint needs normalizing!?
|
||||
String displayedText = writer.toString().replaceAll( "\r(?!\n)|(?<!\r)\n|\r\n", "\n" ); // sloppyPrint needs normalizing!?
|
||||
resultArea.setText( displayedText );
|
||||
resultArea.setCaretPosition( 0 );
|
||||
areasPane.setSelectedComponent( resultScroll );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue