softmoth / raku-Template-Mustache

Raku library for the Mustache template format
https://modules.raku.org/dist/Template::Mustache:cpan:SOFTMOTH
Artistic License 2.0
21 stars 19 forks source link

Triple Mustache doesn't work when the field name contains a minus #29

Closed holli-holzer closed 4 years ago

holli-holzer commented 5 years ago
say Template::Mustache.render('{{{ bar-x }}}', %(:bar-x) ); # '{True}', should be 'True'
say Template::Mustache.render('{{{ bar }}}', %(:bar) );     # 'True', works as expected

Boy, that took me a while to figure out.

finanalyst commented 4 years ago

I looked at this superficially. 'bar-x' should be identified as a name and treated the same way as 'bar'. It is not immediately clear where the extra { } are being added.

softmoth commented 4 years ago

Thank you so much for this bug report! I'm sorry it caused you grief.

It is fixed in revision fbf80dc .