Correct regexp in build/pre-compile.js that matches string literals.

Former-commit-id: 0ae905b74103df321f997e1d83ac5ce54a17e552
This commit is contained in:
John-David Dalton
2013-06-22 00:05:37 -07:00
parent 30e257bc2b
commit b7cb090144

View File

@@ -293,7 +293,7 @@
source = source.replace("result[length]['value']", 'result[length].value');
// remove whitespace from string literals
source = source.replace(/^((?:[ "'\w]+:)? *)"[^"\n\\]*(?:\\.[^"\n\\]*)*"|'[^'\n\\]*(?:\\.[^'\n\\]*)*'/gm, function(string, left) {
source = source.replace(/^((?:[ "'\w]+:)? *)"[^"\n\\]*?(?:\\.[^"\n\\]*?)*"|'[^'\n\\]*?(?:\\.[^'\n\\]*?)*'/gm, function(string, left) {
// clip after an object literal property name or leading spaces
if (left) {
string = string.slice(left.length);