Przeglądaj źródła

Fix exports.to_html

tags/0.7.0
Michael Jackson 13 lat temu
rodzic
commit
7489f70790
1 zmienionych plików z 11 dodań i 11 usunięć
  1. +11
    -11
      mustache.js

+ 11
- 11
mustache.js Wyświetl plik

@@ -27,17 +27,6 @@ var Mustache;
exports.Context = Context;
exports.Writer = Writer;

// This is here for backwards compatibility with 0.4.x.
exports.to_html = function (template, view, partials, send) {
var result = render(template, view, partials);

if (typeof send === "function") {
send(result);
} else {
return result;
}
};

var whiteRe = /\s*/;
var spaceRe = /\s+/;
var nonSpaceRe = /\S/;
@@ -597,6 +586,17 @@ var Mustache;
return _writer.render(template, view, partials);
};

// This is here for backwards compatibility with 0.4.x.
exports.to_html = function (template, view, partials, send) {
var result = exports.render(template, view, partials);

if (typeof send === "function") {
send(result);
} else {
return result;
}
};

return exports;

}())));

Ładowanie…
Anuluj
Zapisz