浏览代码

Fix exports.to_html

tags/0.7.0
Michael Jackson 13 年前
父节点
当前提交
7489f70790
共有 1 个文件被更改,包括 11 次插入11 次删除
  1. +11
    -11
      mustache.js

+ 11
- 11
mustache.js 查看文件

@@ -27,17 +27,6 @@ var Mustache;
exports.Context = Context; exports.Context = Context;
exports.Writer = Writer; 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 whiteRe = /\s*/;
var spaceRe = /\s+/; var spaceRe = /\s+/;
var nonSpaceRe = /\S/; var nonSpaceRe = /\S/;
@@ -597,6 +586,17 @@ var Mustache;
return _writer.render(template, view, partials); 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; return exports;


}()))); }())));

正在加载...
取消
保存