noahmorrison / chevron

A Python implementation of mustache
MIT License
486 stars 52 forks source link

Warn on undefined expressions #71

Closed joshhansen closed 3 years ago

joshhansen commented 4 years ago

Maybe this defies the Mustache spec, but I wish I could get a warning (or error) if I ever try to do {{variable}} for a variable or expression that doesn't exist at all in the data. I'd be happy to try to add such a thing myself but thought I'd see what the author's guidance might be.

joshhansen commented 4 years ago

Here's a branch trying to implement this, not yet tested: https://github.com/joshhansen/chevron/tree/master_warn

jackgerrits commented 3 years ago

+1 this would be helpful!

noahmorrison commented 3 years ago

I've merged your PR into main and pushed it out in the 0.14.0 release of chevron. Thanks for contributing!