mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 01:57:50 +00:00
Remove auto with statement removal optimization from _.template. [closes #166]
Former-commit-id: da27942b109844d44327914631b7c5681489b04b
This commit is contained in:
15
build.js
15
build.js
@@ -1650,12 +1650,17 @@
|
||||
'',
|
||||
' text.replace(reDelimiters, function(match, escapeValue, interpolateValue, evaluateValue, offset) {',
|
||||
' source += text.slice(index, offset).replace(reUnescapedString, escapeStringChar);',
|
||||
' source +=',
|
||||
' escapeValue ? "\' +\\n_.escape(" + escapeValue + ") +\\n\'" :',
|
||||
' evaluateValue ? "\';\\n" + evaluateValue + ";\\n__p += \'" :',
|
||||
' interpolateValue ? "\' +\\n((__t = (" + interpolateValue + ")) == null ? \'\' : __t) +\\n\'" : \'\';',
|
||||
'',
|
||||
' if (escapeValue) {',
|
||||
' source += "\' +\\n_.escape(" + escapeValue + ") +\\n\'";',
|
||||
' }',
|
||||
' if (evaluateValue) {',
|
||||
' source += "\';\\n" + evaluateValue + ";\\n__p += \'";',
|
||||
' }',
|
||||
' if (interpolateValue) {',
|
||||
' source += "\' +\\n((__t = (" + interpolateValue + ")) == null ? \'\' : __t) +\\n\'";',
|
||||
' }',
|
||||
' index = offset + match.length;',
|
||||
' return match;',
|
||||
' });',
|
||||
'',
|
||||
' source += "\';\\n";',
|
||||
|
||||
Reference in New Issue
Block a user