nunjucks v2.4.0 Release Notes

Release Date: 2016-03-10 // about 8 years ago
    • πŸ‘ Allow retrieving boolean-false as a global. Thanks Marius BΓΌscher. Merge of #694.

    • Don't automatically convert any for-loop that has an include statement into an async loop. Reverts 7d4716f4fd, re-opens #372, fixes #527. Thanks Tom Delmas for the report.

    • πŸ“œ Switch from Optimist to Yargs for argument-parsing. Thanks Bogdan Chadkin. Merge of #672.

    • πŸ”€ Prevent includes from writing to their including scope. Merge of #667 (only partially backported to 2.x; macro var visibility not backported).

    • πŸ›  Fix handling of dev environment option, to get full tracebacks on errors (including nunjucks internals). Thanks Tobias Petry and Chandrasekhar Ambula V for the report, Aleksandr Motsjonov for draft patch.

    • πŸ‘Œ Support using in operator to search in both arrays and objects, and it will throw an error for other data types. Fix #659. Thanks Alex Mayfield for report and test, Ouyang Yadong for fix. Merge of #661.

    • βž• Add support for {% set %} block assignments as in jinja2. Thanks Daniele Rapagnani. Merge of #656

    • πŸ›  Fix {% set %} scoping within macros. Fixes #577 and the macro portion of #561. Thanks Ouyang Yadong. Merge of #653.

    • βž• Add support for named endblock (e.g. {% endblock foo %}). Thanks ricordisamoa. Merge of #641.

    • πŸ›  Fix range global with zero as stop-value. Thanks Thomas Hunkapiller. Merge of #638.

    • πŸ›  Fix a bug in urlize that collapsed whitespace. Thanks Paulo Bu. Merge of #637.

    • βž• Add sum filter. Thanks Pablo MatΓ­as Lazo. Merge of #629.

    • Don't suppress errors inside {% if %} tags. Thanks Artemy Tregubenko for report and test, Ouyang Yadong for fix. Merge of #634.

    • πŸ‘ Allow whitespace control on comment blocks, too. Thanks Ouyang Yadong. Merge of #632.

    • πŸ›  Fix whitespace control around nested tags/variables/comments. Thanks Ouyang Yadong. Merge of #631.