Update whitespace removal for delete operators in pre-compile.js.

Former-commit-id: 8dddeed54f8f13268f777d829ba52363706b9f4a
This commit is contained in:
John-David Dalton
2012-08-25 00:56:00 -07:00
parent 21eda2a1a3
commit bb553b8a6a

View File

@@ -277,7 +277,7 @@
// remove whitespace from string literals
source = source.replace(/'(?:(?=(\\?))\1.)*?'/g, function(string) {
// avoids removing the '\n' of the `stringEscapes` object
return string.replace(/\[object |else if|function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) {
return string.replace(/\[object |delete |else if|function | in |return\s+[\w']|throw |typeof |use strict|var |@ |'\\n'|\\\\n|\\n|\s+/g, function(match) {
return match == false || match == '\\n' ? '' : match;
});
});