Optimize the ES6 template delimiter regexp and regexp to detect strings.

Former-commit-id: 6177f2b32f27515cf8edcac6036d0adb58ebfcd0
This commit is contained in:
John-David Dalton
2013-02-16 23:17:17 -08:00
parent 2a2bc44f43
commit 7eadf11145
3 changed files with 3 additions and 3 deletions

View File

@@ -55,7 +55,7 @@
* Used to match ES6 template delimiters
* http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6
*/
var reEsTemplate = /\$\{((?:(?=\\?)\\?[\s\S])*?)\}/g;
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
/** Used to match "interpolate" template delimiters */
var reInterpolate = /<%=([\s\S]+?)%>/g;