Fix some typos; add missing line
authorMichael M Slusarz <slusarz@curecanti.org>
Thu, 6 Aug 2009 21:09:37 +0000 (15:09 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 6 Aug 2009 21:25:37 +0000 (15:25 -0600)
framework/Text_Filter/lib/Horde/Text/Filter/JavascriptMinify/JsMin.php

index ee01bb9..8539efc 100644 (file)
@@ -79,7 +79,8 @@ class Horde_Text_Filter_JavascriptMinify_JsMin
             case "\n":
                 if ($this->_b === ' ') {
                     $cmd = self::ACTION_DELETE_A_B;
-                } elseif (!$this->_isAlphaNum($this->_b)) {
+                } elseif (!strspn($this->_b, '{[(+-') &&
+                          !$this->_isAlphaNum($this->_b)) {
                     $cmd = self::ACTION_DELETE_A;
                 }
                 break;
@@ -87,7 +88,7 @@ class Horde_Text_Filter_JavascriptMinify_JsMin
             default:
                 if (!$this->_isAlphaNum($this->_a) &&
                     (($this->_b === ' ') ||
-                     (($this->_b === "\n" && !strspn($this->_b, '}])+-"\''))))) {
+                     (($this->_b === "\n" && !strspn($this->_a, '}])+-"\''))))) {
                     $cmd = self::ACTION_DELETE_A_B;
                 }
                 break;