From b7cb09014471de9d753534065ffdb9a2459cf4f5 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Sat, 22 Jun 2013 00:05:37 -0700 Subject: [PATCH] Correct regexp in build/pre-compile.js that matches string literals. Former-commit-id: 0ae905b74103df321f997e1d83ac5ce54a17e552 --- build/pre-compile.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/pre-compile.js b/build/pre-compile.js index 4b43e53b4..a156eb4be 100644 --- a/build/pre-compile.js +++ b/build/pre-compile.js @@ -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);