From 316caf7e8cb7ca2d000380b967f2f458f74fba36 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Wed, 2 Jan 2013 23:35:38 -0800 Subject: [PATCH] Tweak UglifyJS "comments" option and update vendor/benchmark.js. Former-commit-id: 6f09f27936f9453c58138e216399a51732a00173 --- build/minify.js | 2 +- vendor/benchmark.js/benchmark.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/build/minify.js b/build/minify.js index 9cce7d13f..fbd749412 100755 --- a/build/minify.js +++ b/build/minify.js @@ -330,7 +330,7 @@ // restrict lines to 500 characters for consistency with the Closure Compiler var stream = uglifyJS.OutputStream({ 'ascii_only': true, - 'comments': /\* *@license/, + 'comments': /@cc_on|@license|@preserve/i, 'max_line_len': 500, }); diff --git a/vendor/benchmark.js/benchmark.js b/vendor/benchmark.js/benchmark.js index fe5ff3db0..2a39cb4fe 100644 --- a/vendor/benchmark.js/benchmark.js +++ b/vendor/benchmark.js/benchmark.js @@ -1648,7 +1648,10 @@ function interpolate(string, object) { forOwn(object, function(value, 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; }