Просмотр исходного кода

Fix exports.to_html

tags/0.7.0
Michael Jackson 13 лет назад
Родитель
Сommit
7489f70790
1 измененных файлов: 11 добавлений и 11 удалений
  1. +11
    -11
      mustache.js

+ 11
- 11
mustache.js Просмотреть файл

@@ -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;

}())));

Загрузка…
Отмена
Сохранить