Detect and remove additional unnecessary brackets from template strings during the build process.

Former-commit-id: 0b9786e7d41497fd1627e31401a5e7e0926eea9c
This commit is contained in:
John-David Dalton
2012-08-14 00:12:27 -07:00
parent 01fb1a5775
commit ebd16105f2

View File

@@ -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'+"
);
/*--------------------------------------------------------------------------*/