Skip to content

Commit d517e10

Browse files
committed
Revert "Merge pull request janl#643 from raymond-lam/issue617"
This reverts commit b283da5, reversing changes made to 23beb3a.
1 parent b283da5 commit d517e10

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

mustache.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@
447447
var tokens = cache[template];
448448

449449
if (tokens == null)
450-
tokens = cache[template + ':' + (tags || mustache.tags).join(':')] = parseTemplate(template, tags);
450+
tokens = cache[template] = parseTemplate(template, tags);
451451

452452
return tokens;
453453
};

test/parse-test.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -103,36 +103,4 @@ describe('Mustache.parse', function () {
103103
});
104104
});
105105

106-
describe('when parsing a template without tags specified followed by the same template with tags specified', function() {
107-
it('returns different tokens for the latter parse', function() {
108-
var template = "{{foo}}[bar]";
109-
var parsedWithBraces = Mustache.parse(template);
110-
var parsedWithBrackets = Mustache.parse(template, ['[', ']']);
111-
assert.notDeepEqual(parsedWithBrackets, parsedWithBraces);
112-
});
113-
});
114-
115-
describe('when parsing a template with tags specified followed by the same template with different tags specified', function() {
116-
it('returns different tokens for the latter parse', function() {
117-
var template = "(foo)[bar]";
118-
var parsedWithParens = Mustache.parse(template, ['(', ')']);
119-
var parsedWithBrackets = Mustache.parse(template, ['[', ']']);
120-
assert.notDeepEqual(parsedWithBrackets, parsedWithParens);
121-
});
122-
});
123-
124-
describe('when parsing a template after already having parsed that template with a different Mustache.tags', function() {
125-
it('returns different tokens for the latter parse', function() {
126-
var template = "{{foo}}[bar]";
127-
var parsedWithBraces = Mustache.parse(template);
128-
129-
var oldTags = Mustache.tags;
130-
Mustache.tags = ['[', ']'];
131-
var parsedWithBrackets = Mustache.parse(template);
132-
Mustache.tags = oldTags;
133-
134-
assert.notDeepEqual(parsedWithBrackets, parsedWithBraces);
135-
});
136-
});
137-
138106
});

0 commit comments

Comments
 (0)