Continuation of commit f3825d3
This commit is contained in:
parent
b070c65845
commit
724a40c5a2
1 changed files with 4 additions and 2 deletions
|
@ -337,7 +337,8 @@ public class ModXMLSandbox extends JFrame implements ActionListener {
|
|||
|
||||
StringWriter writer = new StringWriter();
|
||||
SloppyXMLOutputProcessor.sloppyPrint( mainDoc, writer, null );
|
||||
mainArea.setText( writer.toString() );
|
||||
String displayedText = writer.toString().replaceAll( "\r(?!\n)|(?<!\r)\n", "\r\n" ); // sloppyPrint needs normalizing!?
|
||||
mainArea.setText( displayedText );
|
||||
mainArea.setCaretPosition( 0 );
|
||||
areasPane.setSelectedComponent( mainScroll );
|
||||
resultArea.setText( "" );
|
||||
|
@ -376,7 +377,8 @@ public class ModXMLSandbox extends JFrame implements ActionListener {
|
|||
|
||||
StringWriter writer = new StringWriter();
|
||||
SloppyXMLOutputProcessor.sloppyPrint( resultDoc, writer, null );
|
||||
resultArea.setText( writer.toString() );
|
||||
String displayedText = writer.toString().replaceAll( "\r(?!\n)|(?<!\r)\n", "\r\n" ); // sloppyPrint needs normalizing!?
|
||||
resultArea.setText( displayedText );
|
||||
resultArea.setCaretPosition( 0 );
|
||||
areasPane.setSelectedComponent( resultScroll );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue