diff --git a/mustache.js b/mustache.js index 35f3f0d..6bf4694 100644 --- a/mustache.js +++ b/mustache.js @@ -146,7 +146,7 @@ var Mustache = function() { createParserContext: function(tokens, partials, openTag, closeTag) { return { tokens: tokens, - token: function() { return this.tokens[this.index]; }, + token: tokens[0], index: 0, length: tokens.length, partials: partials, @@ -185,15 +185,7 @@ var Mustache = function() { regex = this._createTokenizerRegex(openTag, closeTag); } - var tokens = this.splitFunc.call(template, regex); - var cleaned_tokens = []; - for (var i = 0, n = tokens.length; i