Sfoglia il codice sorgente

whoopsiedupecode

tags/0.3.0
Jan Lehnardt 16 anni fa
parent
commit
4466a47561
1 ha cambiato i file con 6 aggiunte e 9 eliminazioni
  1. +6
    -9
      mustache.js

+ 6
- 9
mustache.js Vedi File

@@ -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) {


Loading…
Annulla
Salva