diff --git a/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.java b/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.java index fec6c0e4..c0d44d33 100644 --- a/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.java +++ b/sqldev/src/main/java/org/utplsql/sqldev/ui/runner/RunnerPanel.java @@ -923,6 +923,13 @@ private String getLinkedAndFormattedText(final String text) { localText = localText.substring(0, start) + title + localText.substring(end); m = p3.matcher(localText); } + // replaces two consecutive spaces with two non-breaking spaces to fix #140 + // assume that consecutive spaces do not conflict with previous replacements + // using CSS "white-space: pre-wrap;" does not work within Swing, it's simply ignored. + // See https://docs.oracle.com/javase/8/docs/api/javax/swing/text/html/CSS.html + // putting text in pre tags is not an option, because this suppresses wrap. + localText = localText.replaceAll(" ", "  "); + // add paragraph for each line to preserve line breaks StringBuilder sb = new StringBuilder(); for (final String p : localText.split("\n")) { sb.append("

"); diff --git a/sqldev/src/test/resources/test.properties b/sqldev/src/test/resources/test.properties index 3b8b4b51..9c71960d 100644 --- a/sqldev/src/test/resources/test.properties +++ b/sqldev/src/test/resources/test.properties @@ -1,5 +1,5 @@ # properties to connect to Oracle Database using JDBC thin driver -host=localhost +host=fillmore port=1521 service=odb.docker