Laurent Bedubourg 18 gadi atpakaļ
vecāks
revīzija
206ec26bcc
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  1. 3 2
      std/mtwin/text/Text2Xhtml.hx

+ 3 - 2
std/mtwin/text/Text2Xhtml.hx

@@ -150,9 +150,10 @@ class Text2Xhtml {
 		str = StringTools.replace(str, "\r\n", "\n");
 		str = StringTools.replace(str, "\r", "\n");
 		str = StringTools.htmlEscape(str);
-		while (!StringTools.endsWith(str, "\n\n")){
+		while (!StringTools.endsWith(str, "\n\n"))
 			str += "\n";
-		}			
+		while (!StringTools.startsWith(str, "\n\n"))
+			str = "\n"+str;
 
 		var helper = new StringHelper(str);
 		var extractedPre = helper.extract("pre", pre, "<pre>$1</pre>");