diff options
author | John Resig <jeresig@gmail.com> | 2007-02-25 07:11:59 +0000 |
---|---|---|
committer | John Resig <jeresig@gmail.com> | 2007-02-25 07:11:59 +0000 |
commit | 21ca78bcd0c800ad8b54dcd7c73418e219f0ce49 (patch) | |
tree | f9a976d6124a618404650b30c3aab7f48d039fb0 /build | |
parent | 9dc40f564e79c3e5d8818afa4a1e7a1d243fbcf5 (diff) | |
download | jquery-21ca78bcd0c800ad8b54dcd7c73418e219f0ce49.tar.gz jquery-21ca78bcd0c800ad8b54dcd7c73418e219f0ce49.zip |
A small fix that makes the Packer compressor about 10% more efficient.
Diffstat (limited to 'build')
-rw-r--r-- | build/js/pack.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/build/js/pack.js b/build/js/pack.js index 56bfdd1a2..2c13dfb26 100644 --- a/build/js/pack.js +++ b/build/js/pack.js @@ -110,7 +110,7 @@ function pack(_script, _encoding, _fastDecode, _specialChars) { var $parser = new ParseMaster; var $encode = _getEncoder(_encoding); // for high-ascii, don't encode single character low-ascii - var $regexp = (_encoding > 62) ? /\w\w+/ : /\w+/; + var $regexp = (_encoding > 62) ? /\w\w+/ : /(\(\)|\){|var |return |&&|==|typeof |function\(?|if\(|for\(|while\(|[a-zA-Z0-9]+|\)}|\[\d\])/; // build the word list $keywords = _analyze($script, _globalize($regexp), $encode); var $encoded = $keywords.$encoded; |