Skip to content

Releases: djc/askama

0.6.2

18 Apr 07:48
@djc djc
Compare
Choose a tag to compare

Some great bug reports came in after the 0.6.0 and 0.6.1 releases last week, which I fixed:

  • Fixed problems with using nested filter (or macro) calls in expressions (#78)
  • Add documentation and tests for comments, after an issue with whitespace surrounding comments was found (#79)

0.6.1

18 Apr 07:46
@djc djc
Compare
Choose a tag to compare

This is a quick bugfix release for #73: due to an unsupported way of including syn, Askama had a run-time dependency on proc-macro, which didn't work well in some scenarios. Thanks to @dtolnay for the bug fix.

0.6.0

12 Apr 18:39
@djc djc
Compare
Choose a tag to compare

Finally, another release of Askama, the type-safe compiled Jinja-like Rust templating library. The biggest feature in this release is the support for match blocks, 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 Responder which 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!

0.5.0

07 Sep 18:55
@djc djc
Compare
Choose a tag to compare

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 source attribute. This means escaping is now only on by default for templates with a html, htm, or xml extension. 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.

0.4.0

06 Sep 18:38
@djc djc
Compare
Choose a tag to compare

Roughly six months after announcing the first public version of Askama, 0.4.0 feels like a large update.

There are some breaking changes compared to the 0.3.0 series:

  • &, < and > are replaced with HTML character entities by default (see #23)
  • Run-time errors are now returned via custom Error and Result types

Other noteworthy new features include:

  • Optional integrations for Rocket and Iron (see examples for Rocket and Iron)
  • Support for defining variables, user-defined filters, includes and macros
  • Inheriting templates no longer have to use _parent to refer to fields from the parent context
  • Template implementations now automatically implement Display
  • Better robustness and more explicit error handling through panics at compile time
  • Much faster compilation in some edge cases with nested binary operators

Special thanks to those who have contributed to this release, in particular @anowell and @defyrlt.

Please post your feedback or questions as an issue or join the chat!

0.3.4

06 Aug 18:57
@djc djc
Compare
Choose a tag to compare
  • Add support for chained attributes (fixes #22)
  • Fix edge cases in content literal parser (fixes #24)

0.3.2

12 Mar 20:03
@djc djc
Compare
Choose a tag to compare
  • No longer need to use std; or use askama; in template modules (#17)
  • Add lower, trim and upper filters (#16, #19)
  • Documentation improvements, including an explanation of inheritance pitfalls

0.3.1

09 Mar 13:56
@djc djc
Compare
Choose a tag to compare
  • Prevent errors due to type parameter defaults in generic types (#12)
  • Some documentation improvements

0.3.0

09 Mar 13:56
@djc djc
Compare
Choose a tag to compare
  • Hide askama_derive crate usage inside askama, making it easier to use (#2)
  • Better support for Iterator variants in for loops (#8)
  • Add support for having generic type parameters in template context structs (#11)
  • Fix bugs around loop index attributes (#10)
  • Improve error messages in case of errors (#3, #4)

0.2.1

09 Mar 14:00
@djc djc
Compare
Choose a tag to compare
  • Add code coverage tracking through codecov.io
  • A number of documentation improvements