Handlebars-Net / Handlebars.Net

A real .NET Handlebars engine
MIT License
1.26k stars 217 forks source link

Supporting `@last` for object iteration by default #480

Closed yoshigev closed 2 years ago

yoshigev commented 2 years ago

For JS implementation, @last is supported for object iteration since 2014 (added here).

For .NET it is disabled by default, and controlled by the SupportLastInObjectIterations configuration flag, with the following note:

If true enables support for @last in object properties iterations. Not supported in Handlebarsjs.

By leaving the default false, the .NET engine is incompatible to the JS engine out-of-the-box.

So please consider changing the default to true, or at least add documentation of SupportLastInObjectIterations...

Thanks, Yehoshua

oformaniuk commented 2 years ago

Hello @yoshigev I'd be happy to merge the PR 😃