twitter / hogan.js

A compiler for the Mustache templating language
http://twitter.github.io/hogan.js
Apache License 2.0
5.14k stars 431 forks source link

Root element iteration broken (ok in mustache.js) #154

Open Thinkscape opened 11 years ago

Thinkscape commented 11 years ago
var tpl = Hogan.compile('{{#.}} {{name}} {{/.}}');
tpl.render([{name:'foo'},{name:'bar'}]);

Expected:

foo bar

Actual: empty string

Works fine with Mustache, doesn't work in hogan.js.

eirslett commented 10 years ago

+1 Isn't Hogan supposed to pass all Mustache tests? Maybe this one isn't tested properly...

Mr0grog commented 9 years ago

This recently hit me when we transitioned over to precompiling our templates with Hogan. Would be really great to see this fixed.