nunjucks v2.0.0 Release Notes

Release Date: 2015-08-30 // over 8 years ago
  • Most 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 default filter has changed. It will show the default value only if the argument is undefined. Any other value, even false-y values like false and null, will be returned. You can get back the old behavior by passing true as 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!