coolony / kiwi

Simple yet powerful asynchronous JavaScript template engine based on jQuery Template syntax, usable server-side or client-side.
MIT License
41 stars 6 forks source link

Prepend / append not working. #2

Closed panosru closed 12 years ago

panosru commented 12 years ago

Reproducible code:

kiwi.js:

var kiwi = require('kiwi');

var template = new kiwi.Template('{{extend "template"}} {{block welcome append}} ${name}{{/block}}', { cache : false, path : __dirname + '/template.kiwi' });
template.render({name : 'panosru'}, function (err, output) { 
  if (err) { console.log(err); return; }
  console.log(output.trim());
});

template.kiwi:

{{block welcome}}
Hello
{{/block}}

Output:

root@dev:/home/admin/example/kiwi# node kiwi.js 
[Error: Compilation error: Unable to parse tag `block welcome append`.]
panosru commented 12 years ago

Ah ok, it works for the development version of kiwi :)