فهرست منبع

trim() -> rtrim() to avoid weird spacing problem I created.
Maybe opera just had lines that were 1 char too long. Luke -- feel like
testing?

Tyler Akins 24 سال پیش
والد
کامیت
01dd929415
1فایلهای تغییر یافته به همراه3 افزوده شده و 2 حذف شده
  1. 3 2
      src/compose.php

+ 3 - 2
src/compose.php

@@ -431,11 +431,12 @@
 	 // Rewrap $body so that no line is bigger than $editor_size
 	 // This should only really kick in the sqWordWrap function
 	 // if the browser doesn't support "HARD" as the wrap type
+	 // Or, in Opera's case, something goes wrong.
 	 $body = explode("\n", $body);
 	 $newBody = '';
 	 foreach ($body as $line) {
-	    $line = trim($line);
-	    if (strlen($line) <= $editor_size)
+	    $line = rtrim($line);
+	    if (strlen($line) <= $editor_size + 1)
 	       $newBody .= $line . "\n";
 	    else {
 	       sqWordWrap($line, $editor_size) . "\n";