Better distinguish between \n and \\ in build\pre-compile.js.

Former-commit-id: 8e32e4824a0780dcdd97e81f553df37a701e8d5d
This commit is contained in:
John-David Dalton
2013-06-21 23:33:18 -07:00
parent 9db7234f24
commit fbd5679fb1

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);