From d9ab0b00415fc93154bd92b743fb3ca51e39ac7a Mon Sep 17 00:00:00 2001 From: Jan Lehnardt Date: Wed, 24 Mar 2010 00:52:22 -0700 Subject: [PATCH] Revert "Parse pragmas only once" This reverts commit 738de0bcaeb6e6a413b8c05ae031bd1c99b82a32. Conflicts: mustache.js --- mustache.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mustache.js b/mustache.js index 940949e..25d8390 100644 --- a/mustache.js +++ b/mustache.js @@ -17,7 +17,6 @@ var Mustache = function() { ctag: "}}", pragmas: {}, buffer: [], - pragmas_parsed: false, pragmas_implemented: { "IMPLICIT-ITERATOR": true }, @@ -37,9 +36,7 @@ var Mustache = function() { this.buffer = []; } - if(!this.pragmas_parsed) { - template = this.render_pragmas(template); - } + template = this.render_pragmas(template); var html = this.render_section(template, context, partials); if(in_recursion) { return this.render_tags(html, context, partials, in_recursion); @@ -61,7 +58,6 @@ var Mustache = function() { Looks for %PRAGMAS */ render_pragmas: function(template) { - this.pragmas_parsed = true; // no pragmas if(template.indexOf(this.otag + "%") == -1) { return template;