Selaa lähdekoodia

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 vuotta sitten
vanhempi
commit
01dd929415
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  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
 	 // Rewrap $body so that no line is bigger than $editor_size
 	 // This should only really kick in the sqWordWrap function
 	 // This should only really kick in the sqWordWrap function
 	 // if the browser doesn't support "HARD" as the wrap type
 	 // if the browser doesn't support "HARD" as the wrap type
+	 // Or, in Opera's case, something goes wrong.
 	 $body = explode("\n", $body);
 	 $body = explode("\n", $body);
 	 $newBody = '';
 	 $newBody = '';
 	 foreach ($body as $line) {
 	 foreach ($body as $line) {
-	    $line = trim($line);
-	    if (strlen($line) <= $editor_size)
+	    $line = rtrim($line);
+	    if (strlen($line) <= $editor_size + 1)
 	       $newBody .= $line . "\n";
 	       $newBody .= $line . "\n";
 	    else {
 	    else {
 	       sqWordWrap($line, $editor_size) . "\n";
 	       sqWordWrap($line, $editor_size) . "\n";