Changelog History
Page 3
-
v2.4.0 Changes
March 10, 2016π 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
devenvironment 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
inoperator 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
rangeglobal 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
sumfilter. 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.
-
v2.3.0 Changes
January 06, 2016Return
nullfromWebLoaderon missing template instead of throwing an error, for consistency with other loaders. This allowsWebLoaderto support the newignore missingflag on theincludetag. Ifignore missingis not set, a generic "template not found" error will still be thrown, just like for any other loader. Ajax errors other than 404 will still causeWebLoaderto throw an error directly.β Add preserve-linebreaks option to
striptagsfilter. Thanks Ivan Kleshnin. Merge of #619.
-
v2.2.0 Changes
November 23, 2015- β Add
striptagsfilter. Thanks Anthony Giniers. Merge of #589. - π Allow compiled templates to be imported, included and extended. Thanks Luis Gutierrez-Sheris. Merge of #581.
- π Fix issue with different nunjucks environments sharing same globals. Each environment is now independent. Thanks Paul Pechin. Merge of #574.
- β Add negative steps support for range function. Thanks Nikita Mostovoy. Merge of #575.
- β Remove deprecation warning when using the
defaultfilter without specifying a third argument. Merge of #567. - β Add support for chaining of addGlobal, addFilter, etc. Thanks Rob Graeber. Merge of #537
- π Fix error propagation. Thanks Tom Delmas. Merge of #534.
- π trimBlocks now also trims windows style line endings. Thanks Magnus Tovslid. Merge of #548
- π
includenow supports an option to suppress errors if the template does not exist. Thanks Mathias Nestler. Merge of #559
- β Add
-
v2.1.0 Changes
September 21, 2015- π Fix creating
WebLoaderwithoutopts. Merge of #524. - β Add
hasExtensionandremoveExtensionmethods toEnvironment. Merge of #512. - β Add support for kwargs in
sortfilter. Merge of #510. - β Add
noneas a lexed constant evaluating tonull. Merge of #480. - π Fix rendering of multiple
rawblocks. Thanks Aaron O'Mullan. Merge of #503. - π Avoid crashing on async loader error. Thanks Samy PessΓ©. Merge of #504.
- β Add support for keyword arguments for sort filter. Thanks Andres Pardini. Merge of #510
- π Fix creating
-
v2.0.0 Changes
August 30, 2015Most of the changes can be summed up in the issues tagged 2.0.
Or you can π see all commits.
Most important changes:
- 0οΈβ£ autoescape is now on by default. You need to explicitly pass
{ autoescape: false }in the options to turn it off. - 0οΈβ£ watch is off by default. You need to explicitly pass
{ watch: true }to start the watcher. - 0οΈβ£ The
defaultfilter has changed. It will show the default value only if the argument is undefined. Any other value, even false-y values likefalseandnull, will be returned. You can get back the old behavior by passingtrueas a 3rd argument to activate the loose-y behavior:foo | default("bar", true). In 2.0 if you don't pass the 3rd argument, a warning will be displayed about this change in behavior. In 2.1 this warning will be removed. - New filter tag
- π Lots of other bug fixes and small features, view the above issue list!
- 0οΈβ£ autoescape is now on by default. You need to explicitly pass
-
v1.3.4 Changes
April 27, 2015π This is an extremely minor release that only adds an .npmignore so that the β bench, tests, and docs folders do not get published to npm. Nunjucks should download a lot faster now.
-
v1.3.3 Changes
April 03, 2015This is exactly the same as v1.3.1, just fixing a typo in the git version tag.
-
v1.3.2 Changes
April 03, 2015(no notes)
-
v1.3.1 Changes
April 03, 2015We added strict mode to all the files, but that broke running nunjucks in the π» browser. Should work now with this small fix.
-
v1.3.0 Changes
April 03, 2015- Relative templates: you can now load a template relatively by starting the path with ., like ./foo.html
- FileSystemLoader now takes a noCache option, if true will disable caching entirely
- β Additional lstripBlocks and trimBlocks available to clean output automatically
- π New selectattr and rejectattr filters
- π Small fixes to the watcher
- π Several bug fixes