ActiveCampaign / mustachio

Lightweight, powerful, flavorful, template engine.
MIT License
207 stars 17 forks source link

Extending the #Each Syntax to accept a Scalar Value / Object #12

Open justshrey opened 6 years ago

justshrey commented 6 years ago

This request automatically boxes a Scalar Value / Object to an IEnumerable when using the #Each Syntax instead of throwing an Exception

Removes the exception '{0}' is used like an array by the template, but is a scalar value or object in your model.

Addresses issue #11

Will add it to the ParserOption framework made by @JPVenson once it in the main line.

JPVenson commented 5 years ago

Hey @justshrey I have Forked my pull-request and made a lot more changes including the Definition of false. If the changes do not help you out, you could have a look in the fork https://github.com/JPVenson/morestachio

justshrey commented 5 years ago

@JPVenson Thanks 👍 . Will check it out.