File tree 1 file changed +7
-0
lines changed
sqldev/src/main/java/org/utplsql/sqldev/ui/runner
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -923,6 +923,13 @@ private String getLinkedAndFormattedText(final String text) {
923
923
localText = localText .substring (0 , start ) + title + localText .substring (end );
924
924
m = p3 .matcher (localText );
925
925
}
926
+ // replaces two consecutive spaces with two non-breaking spaces to fix #140
927
+ // assume that consecutive spaces do not conflict with previous replacements
928
+ // using CSS "white-space: pre-wrap;" does not work within Swing, it's simply ignored.
929
+ // See https://docs.oracle.com/javase/8/docs/api/javax/swing/text/html/CSS.html
930
+ // putting text in pre tags is not an option, because this suppresses wrap.
931
+ localText = localText .replaceAll (" " , " " );
932
+ // add paragraph for each line to preserve line breaks
926
933
StringBuilder sb = new StringBuilder ();
927
934
for (final String p : localText .split ("\n " )) {
928
935
sb .append ("<p>" );
You can’t perform that action at this time.
0 commit comments