|
|
@@ -17,7 +17,6 @@ var Mustache = function() { |
|
|
ctag: "}}", |
|
|
ctag: "}}", |
|
|
pragmas: {}, |
|
|
pragmas: {}, |
|
|
buffer: [], |
|
|
buffer: [], |
|
|
pragmas_parsed: false, |
|
|
|
|
|
pragmas_implemented: { |
|
|
pragmas_implemented: { |
|
|
"IMPLICIT-ITERATOR": true |
|
|
"IMPLICIT-ITERATOR": true |
|
|
}, |
|
|
}, |
|
|
@@ -37,9 +36,7 @@ var Mustache = function() { |
|
|
this.buffer = []; |
|
|
this.buffer = []; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if(!this.pragmas_parsed) { |
|
|
|
|
|
template = this.render_pragmas(template); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
template = this.render_pragmas(template); |
|
|
var html = this.render_section(template, context, partials); |
|
|
var html = this.render_section(template, context, partials); |
|
|
if(in_recursion) { |
|
|
if(in_recursion) { |
|
|
return this.render_tags(html, context, partials, in_recursion); |
|
|
return this.render_tags(html, context, partials, in_recursion); |
|
|
@@ -61,7 +58,6 @@ var Mustache = function() { |
|
|
Looks for %PRAGMAS |
|
|
Looks for %PRAGMAS |
|
|
*/ |
|
|
*/ |
|
|
render_pragmas: function(template) { |
|
|
render_pragmas: function(template) { |
|
|
this.pragmas_parsed = true; |
|
|
|
|
|
// no pragmas |
|
|
// no pragmas |
|
|
if(template.indexOf(this.otag + "%") == -1) { |
|
|
if(template.indexOf(this.otag + "%") == -1) { |
|
|
return template; |
|
|
return template; |
|
|
|