noahmorrison / chevron

A Python implementation of mustache
MIT License
505 stars 55 forks source link

Add parameterless callable variables #122

Open timdenouden opened 1 year ago

timdenouden commented 1 year ago

In the Mustache.js Javascript Library, functions without parameters can be provided instead of static data values.

This feature is in line with the Mustache spec and in addition allows side effects to be triggered at render time that avoids specific catch 22 issues when trying to inject data into templates.

Please see added unit test for usage.