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.