From fbd5679fb1b1d969383316ce8130343035c7c626 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Fri, 21 Jun 2013 23:33:18 -0700 Subject: [PATCH] Better distinguish between `\n` and `\\` in build\pre-compile.js. Former-commit-id: 8e32e4824a0780dcdd97e81f553df37a701e8d5d --- 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 f7c1ef4ed..4b43e53b4 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);