hogan.js icon indicating copy to clipboard operation
hogan.js copied to clipboard

Root element iteration broken (ok in mustache.js)

Open Thinkscape opened this issue 12 years ago • 2 comments

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.

Thinkscape avatar Nov 04 '13 19:11 Thinkscape

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

eirslett avatar Jun 24 '14 14:06 eirslett

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

Mr0grog avatar Apr 17 '15 01:04 Mr0grog