mirror of
https://github.com/mrclay/minify.git
synced 2025-08-22 13:42:48 +02:00
Update to version 1.1.0.
This commit is contained in:
@@ -41,7 +41,7 @@
|
|||||||
* @copyright 2002 Douglas Crockford <douglas@crockford.com> (jsmin.c)
|
* @copyright 2002 Douglas Crockford <douglas@crockford.com> (jsmin.c)
|
||||||
* @copyright 2007 Ryan Grove <ryan@wonko.com> (PHP port)
|
* @copyright 2007 Ryan Grove <ryan@wonko.com> (PHP port)
|
||||||
* @license http://opensource.org/licenses/mit-license.php MIT License
|
* @license http://opensource.org/licenses/mit-license.php MIT License
|
||||||
* @version 1.0.0 (2007-05-04)
|
* @version 1.1.0 (2007-06-01)
|
||||||
* @link http://code.google.com/p/jsmin-php/
|
* @link http://code.google.com/p/jsmin-php/
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -61,14 +61,14 @@ class JSMin {
|
|||||||
|
|
||||||
public static function minify($js) {
|
public static function minify($js) {
|
||||||
$jsmin = new JSMin($js);
|
$jsmin = new JSMin($js);
|
||||||
return $jsmin->jsmin();
|
return $jsmin->min();
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- Public Instance Methods ------------------------------------------------
|
// -- Public Instance Methods ------------------------------------------------
|
||||||
|
|
||||||
public function __construct($input) {
|
public function __construct($input) {
|
||||||
$this->input = $input;
|
$this->input = str_replace("\r\n", "\n", $input);
|
||||||
$this->inputLength = strlen($input);
|
$this->inputLength = strlen($this->input);
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- Protected Instance Methods ---------------------------------------------
|
// -- Protected Instance Methods ---------------------------------------------
|
||||||
@@ -164,7 +164,7 @@ class JSMin {
|
|||||||
return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1;
|
return ord($c) > 126 || $c === '\\' || preg_match('/^[\w\$]$/', $c) === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected function jsmin() {
|
protected function min() {
|
||||||
$this->a = "\n";
|
$this->a = "\n";
|
||||||
$this->action(3);
|
$this->action(3);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user