Skip to content

Commit 55b6c22

Browse files
hansonrhansonr
authored andcommitted
Allowing non-breaking space only every other character JSEditorPaneUI.
1 parent 8db66fd commit 55b6c22

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed
10 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201010034700
1+
20201010050645
10 Bytes
Binary file not shown.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
20201010034700
1+
20201010050645

sources/net.sf.j2s.java.core/src/swingjs/plaf/JSEditorPaneUI.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -496,8 +496,9 @@ else if (isSup)
496496
}
497497
} else {
498498
String t = text.substring(start, isDiv ? end - 1 : end);
499-
if (t.indexOf(' ') >= 0)
500-
t = t.replaceAll(" ", "\u00A0");
499+
// but this is nbsp; -- no breaks?? Why did I do this?
500+
if (t.indexOf(" ") >= 0)
501+
t = t.replace(" ", "\u00A0 ");
501502
if (t.indexOf('\t') >= 0) {
502503
t = t.replaceAll("\t", JSTAB);
503504
}

0 commit comments

Comments
 (0)