Skip to content

Commit

Permalink
with
Browse files Browse the repository at this point in the history
  • Loading branch information
QLeelulu committed Apr 22, 2011
1 parent 918536c commit 6ac6d3e
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions nTenjin.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ nTenjin.Template.prototype = {

convert: function(input) {
var buf = [];
buf.push("var _buf='';");
buf.push("with(it){var _buf='';");
this.parseStatements(buf, input);
buf.push("return _buf;");
buf.push("return _buf;}");
buf = buf.join('').split("_buf+='';").join('')
.split("var _buf='';_buf+=").join('var _buf=');
try {
Expand Down Expand Up @@ -131,3 +131,10 @@ nTenjin.render = function(template_str, context) {
var output = template.render(context);
return output;
};

/*
* node.js
*/
if (typeof module !== 'undefined' && module.exports) {
module.exports = nTenjin;
}

0 comments on commit 6ac6d3e

Please sign in to comment.