mwunsch / handlebars.scala

A Scala implementation of the Handlebars templating language (a superset of Mustache).
Apache License 2.0
112 stars 40 forks source link

Partial with argument #58

Closed dgouyette closed 8 years ago

dgouyette commented 8 years ago

Hello,

Is there a way to use partial with arguments ?

I tried with the following syntax :

{{> header scheduling = 1}}

And i got the error msg :

[2.39] failure:}}' expected but =' found {{> header scheduling = 1}}

this error msg is stored in parseResult.msg but it's not displayed. It would be great to display the complete error msg. I can provide a PR if you want

timcharper commented 8 years ago

Hi! The parser doesn't support partials with arguments, but it does support partials with a single context. It wouldn't be too hard.

I believe that putting the message in the parseResult was the intended behavior