Bladeren bron

whoopsiedupecode

tags/0.3.0
Jan Lehnardt 16 jaren geleden
bovenliggende
commit
4466a47561
1 gewijzigde bestanden met toevoegingen van 6 en 9 verwijderingen
  1. +6
    -9
      mustache.js

+ 6
- 9
mustache.js Bestand weergeven

@@ -18,10 +18,12 @@ var Mustache = function() {
context: {},

render: function(template, context, partials, in_recursion) {
// reset buffer
// TODO: make this non-lazy
if(!in_recursion)
this.buffer = [];
// reset buffer & set context
if(!in_recursion) {
this.context = context;
this.buffer = []; // TODO: make this non-lazy
}

// fail fast
if(!this.includes("", template)) {
if(in_recursion) {
@@ -32,11 +34,6 @@ var Mustache = function() {
}
}

if(!in_recursion) {
this.context = context;
this.buffer = [];
}

template = this.render_pragmas(template);
var html = this.render_section(template, context, partials);
if(in_recursion) {


Laden…
Annuleren
Opslaan