lodash: Simplify reUnescaped. [jddalton]

Former-commit-id: 5daf301fb60580248d765f5d3d49e10e9fa7104b
This commit is contained in:
John-David Dalton
2012-05-07 00:47:27 -04:00
parent 9c54df2de5
commit 98942c5e1a
3 changed files with 92 additions and 95 deletions

View File

@@ -42,11 +42,8 @@
/** Used to match tokens in template text */
var reToken = /__token__(\d+)/g;
/**
* Used to match unescaped characters in template text
* (older Safari can't parse unicode escape sequences in a RegExp literals)
*/
var reUnescaped = RegExp('\\\\|[\'\\n\\r\\t\u2028\u2029]', 'g');
/** Used to match unescaped characters in template text */
var reUnescaped = /['\n\r\t\u2028\u2029\\]/g;
/** Used to fix the JScript [[DontEnum]] bug */
var shadowed = [