Browse Source

- added non breaking spaces before ? ! and :

Laurent Bedubourg 18 years ago
parent
commit
3e3f6a8499
1 changed files with 4 additions and 0 deletions
  1. 4 0
      std/mtwin/text/Text2Xhtml.hx

+ 4 - 0
std/mtwin/text/Text2Xhtml.hx

@@ -287,6 +287,10 @@ s.write('swf@id');
 		var https = helper.extract("http", http, "<a href=\"$1://$2\">$1://$2</a>$3");
 		str = helper.str;
 
+		str = StringTools.replace(str, " !", "&nbsp;!");
+		str = StringTools.replace(str, " :", "&nbsp;:");
+		str = StringTools.replace(str, " ?", "&nbsp;?");
+
 		var pos = 0;
 		var token = findFirst(str, [em, strong, cite]);
 		while (token != null){