Tweak UglifyJS "comments" option and update vendor/benchmark.js.

Former-commit-id: 6f09f27936f9453c58138e216399a51732a00173
This commit is contained in:
John-David Dalton
2013-01-02 23:35:38 -08:00
parent 87dc6631ee
commit 316caf7e8c
2 changed files with 5 additions and 2 deletions

View File

@@ -330,7 +330,7 @@
// restrict lines to 500 characters for consistency with the Closure Compiler // restrict lines to 500 characters for consistency with the Closure Compiler
var stream = uglifyJS.OutputStream({ var stream = uglifyJS.OutputStream({
'ascii_only': true, 'ascii_only': true,
'comments': /\* *@license/, 'comments': /@cc_on|@license|@preserve/i,
'max_line_len': 500, 'max_line_len': 500,
}); });

View File

@@ -1648,7 +1648,10 @@
function interpolate(string, object) { function interpolate(string, object) {
forOwn(object, function(value, key) { forOwn(object, function(value, key) {
// escape regexp special characters in `key` // escape regexp special characters in `key`
string = string.replace(RegExp('#\\{' + key.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') + '\\}', 'g'), value); string = string.replace(
RegExp('#\\{' + key.replace(/([.*+?^=!:${}()|[\]\/\\])/g, '\\$1') + '\\}', 'g'),
value.replace(/\$/g, '$$$$')
);
}); });
return string; return string;
} }