Simplify _.template and remove superfluous caching.

Former-commit-id: f9f18a63a77376471e69c95d5046dfe0146b9887
This commit is contained in:
John-David Dalton
2012-09-18 23:42:26 -07:00
parent 6499643769
commit f4ba0e1191
4 changed files with 180 additions and 310 deletions

View File

@@ -282,7 +282,7 @@
source = source.replace(/\+"__p\+='"/g, '+"\\n__p+=\'"');
// remove whitespace from `_.template` related regexes
source = source.replace(/(?:reDelimiterCode\w+|reEmptyString\w+|reInsertVariable) *=.+/g, function(match) {
source = source.replace(/(?:reEmptyString\w+|reInsertVariable) *=.+/g, function(match) {
return match.replace(/ |\\n/g, '');
});