📚 Finally, another release of Askama, the type-safe compiled Jinja-like Rust templating library. The biggest feature in this release is the support for
matchblocks, making it possible to do pattern matching in templates. An example is provided in the documentation.
- Implement basic match functionality (thanks to @anowell)
- ➕ Add support for importing template files with macros (fixes #51, thanks to @larros)
- 🛠 Fixed implementation of Rocket
Responderwhich was broken in the 0.5.0 release
- Infer Content-Type from the file extension for Iron integration (thanks to @hajifkd)
- ➕ Add support for array literals (fixes #59)
- ➕ Add support for tuple indexing (thanks to @larros)
- 🛠 Numerous bug fixes
Thanks to everyone who has contributed to Askama!
Discussing the 0.4.0 release made me think I should quickly make one further change: inferring the escape mode from the template
path, or a specified extension if you're using the
sourceattribute. This means escaping is now only on by default for templates with a
xmlextension. In addition, this release escapes more characters, according to the OWASP recommendations.
⬆️ If you spent time making changes for the 0.4.0 upgrade already, sorry about the churn! I believe this minimizes boilerplate and hopefully doesn't introduce too much magic.