From ebd16105f264a982bae121ecbe4b429cfaad2283 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 14 Aug 2012 00:12:27 -0700 Subject: [PATCH] Detect and remove additional unnecessary brackets from template strings during the build process. Former-commit-id: 0b9786e7d41497fd1627e31401a5e7e0926eea9c --- build.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.js b/build.js index 772413b77..5e4bd287c 100755 --- a/build.js +++ b/build.js @@ -832,11 +832,11 @@ // simplify template snippets by removing unnecessary brackets source = source.replace( - RegExp("{(\\\\n' *\\+\\s*.*?\\+\\n\\s*')}(?:\\\\n)?' *([,\\n])", 'g'), "$1'$2" + RegExp("{(\\\\n' *\\+\\s*.*?\\+\\n\\s*' *)}(?:\\\\n)?' *([,\\n])", 'g'), "$1'$2" ); source = source.replace( - RegExp("{(\\\\n' *\\+\\s*.*?\\+\\n\\s*')}(?:\\\\n)?' *\\+", 'g'), "$1;\\n'+" + RegExp("{(\\\\n' *\\+\\s*.*?\\+\\n\\s*' *)}(?:\\\\n)?' *\\+", 'g'), "$1;\\n'+" ); /*--------------------------------------------------------------------------*/