mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 01:17:50 +00:00
Escape } in regexes used in lodash.js. [closes #179]
Former-commit-id: 7b4687f3967079e19025fccc3f54b7fc5fcc4ff9
This commit is contained in:
6
build.js
6
build.js
@@ -581,7 +581,7 @@
|
||||
' lodash template=... File path pattern used to match template files to precompile',
|
||||
' (e.g. `lodash template=./*.jst`)',
|
||||
' lodash settings=... Template settings used when precompiling templates',
|
||||
' (e.g. `lodash settings="{interpolate:/\\{\\{([\\s\\S]+?)\\}\\}/g}"`)',
|
||||
' (e.g. `lodash settings="{interpolate:/{{([\\s\\S]+?)}}/g}"`)',
|
||||
' lodash moduleId=... The AMD module ID of Lo-Dash, which defaults to “lodash”, used by precompiled templates',
|
||||
'',
|
||||
' All arguments, except `legacy` with `csp`, `mobile`, `modern`, or `underscore`, may be combined.',
|
||||
@@ -2237,7 +2237,7 @@
|
||||
.replace(/'(?:\\n|\s)+'/g, "''")
|
||||
.replace(/__p *\+= *' *';/g, '')
|
||||
.replace(/(__p *\+= *)' *' *\+/g, '$1')
|
||||
.replace(/({) *;|; *(\})/g, '$1$2')
|
||||
.replace(/({) *;|; *(})/g, '$1$2')
|
||||
.replace(/\(\(__t *= *\( *([^)]+) *\)\) *== *null *\? *'' *: *__t\)/g, '($1)');
|
||||
|
||||
// remove the with-statement
|
||||
@@ -2245,7 +2245,7 @@
|
||||
|
||||
// minor cleanup
|
||||
snippet = snippet
|
||||
.replace(/obj *\|\| *\(obj *= *\{}\);/, '')
|
||||
.replace(/obj *\|\| *\(obj *= *{}\);/, '')
|
||||
.replace(/var __p = '';\s*__p \+=/, 'var __p =');
|
||||
|
||||
// remove comments, including sourceURLs
|
||||
|
||||
Reference in New Issue
Block a user