Releases: askama-rs/askama
Releases · askama-rs/askama
v0.15.6
What's Changed
- Correctly handle non-ident item in block error by @GuillaumeGomez in #717
- Remove unnecessary
.clone()by @jplatte in #716 - Remove unused lifetime parameter on
SyntaxAndCacheby @jplatte in #714 - Upgrade
winnowto 1.0 by @jplatte in #715
Full Changelog: v0.15.5...v0.15.6
v0.15.5
What's Changed
- parser: reject non-ASCII characters in byte literals by @Kijewski in #694
- parser: reject syntaxes that could cause catastrophic backtracking by @Kijewski in #695
- Fix jinja macro arguments handling by @GuillaumeGomez in #709
- Fix build determinism and macro path management by @GuillaumeGomez and @cgundy in #710
Full Changelog: v0.15.4...v0.15.5
v0.15.4
What's Changed
- Improve function call handling by @Kijewski in #684
- Correctly handle temporary references by @GuillaumeGomez in #686
Full Changelog: v0.15.3...v0.15.4
v0.15.3
What's Changed
- Update book links (askama.rs) by @Kijewski in #678
- Fix invalid variable parsing by @GuillaumeGomez in #680
Full Changelog: v0.15.2...v0.15.3
v0.15.2
What's Changed
- Correctly handle local variables in
extendsblocks by @GuillaumeGomez in #670 - Better spans for
#[filter_fn]by @Kijewski in #655 - Remove mentions of
salvoby @Kijewski in #659 - Add missing information in the
Upgrading to new versionschapter in the askama book by @GuillaumeGomez in #665 - Fix invalid block call warnings coming from
extendsby @GuillaumeGomez in #666 - Update duplicated blocks warning message and add warning about not compiling starting next version by @GuillaumeGomez in #669
- derive: allow
wherebounds in#[filter_fn]by @Kijewski in #672 - [Book] Improve
filterschapter by @Tirka in #673 - [Book] Use more current markdown syntax for fragment links by @Kijewski in #658
- [Book] Improve
filterschapter examples (by making us ofdefined_orfilter) by @Tirka in #675
New Contributors
Full Changelog: v0.15.1...v0.15.2
v0.15.1
What's Changed
- Fix broken intra-doc links by @GuillaumeGomez in #645
- Fix missing mutability information in generated filters by @GuillaumeGomez in #646
- Fix clippy false positives by using
call_sitefor code generated by the derive proc-macro by @sehnryr in #647 - Add support for lifetimes in filters by @GuillaumeGomez in #649
New Contributors
- @sehnryr made their first contribution in #647
Full Changelog: v0.15.0...v0.15.1
v0.15.0
The main breaking change is about custom filters, they now require the filter_fn attribute. More information about it in the askama book.
(❗ = breaking change)
New features
- ❗ add caller pattern from jinja❗ by @pollend in #422
- ❗Add new
rejectfilter❗ by @GuillaumeGomez in #430 - ❗Treat caller() as variable with support for aliasing❗ by @seijikun in #510
- ❗Add filters
|default,|assigned_orand|defined_or❗ by @Kijewski in #425 - ❗Update minimum supported rust version to 1.88❗ by @GuillaumeGomez in #523
- ❗Add
askama::filter_fnproc-macro for custom filters with named/optional arg support❗ by @seijikun in #545 - Implement
enumvariants by @Kijewski in #255 - Allow filters with explicit path by @Kijewski in #435
- Add support for mutable variables by @GuillaumeGomez in #462
- Add support for macro default value generics by @GuillaumeGomez in #522
- Add support for expression-call syntax for macros by @seijikun in #518
- Implement #531: Allow named arguments in call expr macro invocations by @seijikun in #533
- Add support for array repeat syntax:
[<element_expr>; <cnt_expr>]by @seijikun in #626 - Add support for struct expressions by @VojtaStanek in #602
- format non base 10 numbers at compile time by @tdelabro in #620
- Add new tag to declare variable without value by @GuillaumeGomez in #613
Major internal changes
Improve error location to give better errors:
- Greatly improve error messages on nightly by @GuillaumeGomez in #525
- Generate a
TokenStreamrather than aStringby @GuillaumeGomez in #558 - parser: use
LocatingSlice<&str>instead of&strby @Kijewski in #560 - Use
Parser::[with_]span()to get byte range and use byte range forproc_macro::Spanby @Kijewski in #571
Other
- ❗
filesizeformatwith proper accuracy❗ by @seijikun in #568 - Filters
linebreaks,paragraphbreaksandlinebreaksbronly needcoreby @Kijewski in #486 - Emit an error if an extends block doesn't come first in a template by @GuillaumeGomez in #584
Book/documentation
- Fix tiny wording error in "Calling functions" docs by @m4tx in #423
- book: complete note about filter change by @martinetd in #453
- Update
refdocumentation by @sinder38 in #456 - Update
performance.mdby @zamazan4ik in #188 - book: document all crates on readthedocs by @Kijewski in #473
- Fixed typos in template syntax book docs in #494
- book: update
mdbookversion and highlightjinjablocks by @Kijewski in #544 - Improve documentation by @seijikun in #554
- Minor documentation fixes by @seijikun in #555
- Fix some code examples annotations by @GuillaumeGomez in #577
- Add missing documentation about for loop features by @GuillaumeGomez in #576
- book: add question mark operator by @VojtaStanek in #601
- book: add syntax summary by @VojtaStanek in #603
- book: fix rust-docs on readthedocs by @Kijewski in #528
Internal changes
- Add tests for jinja examples in our book by @GuillaumeGomez in #574
- Make code generator re-usable for other projects by @Kijewski in #434
- parser: simplify
{# comment #}parsing by @Kijewski in #488 - Rename
Expr::AttrintoExpr::AssociatedItemby @GuillaumeGomez in #499 - parser: introduce more types for
Exprvariants by @Kijewski in #498 - parser: refactor
|filterand{% filter %}parsing by @Kijewski in #500 - Use
if-let-chainsby @Kijewski in #527 - derive: more
if-letby @Kijewski in #532 - derive: dedupe visit custom filters code by @Kijewski in #470
Performance
- Add missing
#[inline]annotations by @Kijewski in #421 - parser: un-inline error message generation by @Kijewski in #501
- Refactor
indentFilter Implementation by @strickczq in #466 - Make
wordcountfilter work with core only by @GuillaumeGomez in #480 - derive: un-inline
Expr::Callhandling for{{ expressions }}and remove parentheses by @Kijewski in #540 - parser/derive: replaces usages of
Expr/NodewithBox<Expr>/Box<Node>by @Kijewski in #542 - parser: remove one indirection in
punction()finding by @Kijewski in #543 - filter_fn: Aggressive inlining for builder invocation methods by @seijikun in #616
loop.firstis known by being atindex == 0by @Kijewski in #436
Bugfixes
- generator: remove invisible group from output by @Kijewski in #419
- Relax Sized constraint on
impl FastWritable for Cowby @C0D3-M4513R in #432 - Ignore fuzzing corpus from source line count by @Kijewski in #433
- Use
unicode-identto determine what is an identifier by @Kijewski in #443 - derive: prefix more generated variables with
__askamaby @Kijewski in #444 - derive: don't suppress fatal errors in integer parsing by @Kijewski in #448
- Print invalid generated code during panic by @Kijewski in #446
- Prevent
crateto be used as identifier by @GuillaumeGomez in #450 - Comparison operators cannot be chained by @Kijewski in #457
- Correctly escape and reject macro names by @Kijewski in #460
- parser: macro calls need proper tokens by @Kijewski in #468
- Resolve with macro with call after caller by @pollend in #469
- parser: recognize/reject prefixed ids and lits in macro calls by @Kijewski in #476
- parser: reject illegal string literals by @Kijewski in #479
- Rename
LoopItem::indextoLoopItem::index0by @Kijewski in #481 - parser: reject isolated CRs in string literals by @Kijewski in #483
- parser: better error message for bare CRs by @Kijewski in #485
- parser:
U+10FFFFis the highest Unicode codepoint by @Kijewski in #484 - parser: recognize comments in macro calls by @Kijewski in #487
- parser: implement
{% raw %}andLit::parse()withoutskip_tillby @Kijewski in #489 - parser: fix
{% raw %}for delimiters starting with-by @Kijewski in #491 - parser: string literal must not be immediately followed by
suffix#by @Kijewski in #496 - parser: reject illegal raw identifiers in attribute access & ensure valid paths in generics by @Kijewski in #497
- parser: understand nested block comments in macro calls by @Kijewski in #504
- Fix panic when using include in call block by @seijikun in #516
- parser: fix
check_expr()recursion by @Kijewski in #519 - parser: reject isolated CR in macro inputs, too by @Kijewski in #524
- parser: reject bare CR in doc comments by @Kijewski in #526
- Fix fuzzing macro argument parsing bug by @GuillaumeGomez in #530
- derive: make
EvaluatedResultknow its unknown result by @Kijewski in #538
...
v0.14.0
Added Features
- Implement
Valueson tuple by @GuillaumeGomez in #391 - Pass variables to sub-templates more reliably even if indirectly by @Kijewski in #397
- Implement
firstandblankarguments for|indentby @Kijewski in #401 - Add named arguments for builtin filters by @Kijewski in #403
- Add
uniquefilter by @GuillaumeGomez in #405
Bug Fixes And Consistency
askama_deriveaccidentally exposed as a feature by @Kijewski in #384- Track config files by @GuillaumeGomez in #385
- If using local variable as value when creating a new variable, do not put it behind a reference by @GuillaumeGomez in #392
- generator: make
CARGO_MANIFEST_DIRpart ofConfigKeyby @strickczq in #395 - Do not put question mark initialization expressions behind a reference by @GuillaumeGomez in #400
- Update to more current rust version on readthedocs by @Kijewski in #410
- Fix
uniquefilter implementation by @GuillaumeGomez in #417 - Add
|titlecaseas alias for|titleby @Kijewski in #416
Further Changes
- book: add page about
FastWritableby @Kijewski in #407 - Add throughput to derive benchmark by @Kijewski in #413
- Move
FastWritableintoaskamaroot by @GuillaumeGomez in #411
New Contributors
- @strickczq made their first contribution in #395
Full Changelog: v0.13.0...v0.14.0
v0.13.1
What's Changed
askama_deriveaccidentally exposed as a feature by @Kijewski in #384- Track config files by @GuillaumeGomez in #385
- Implement
Valueson tuple by @GuillaumeGomez in #391 - generator: make
CARGO_MANIFEST_DIRpart ofConfigKeyby @strickczq in #395
New Contributors
- @strickczq made their first contribution in #395
Full Changelog: v0.13.0...v0.13.1
rinja/v0.4.0+deprecated
New versions of rinja will be released under the name askama. Please update your dependencies from e.g. rinja = "0.3.5" to
askama = "0.13.0".
Useful information can be found in our upgrade guide, and in our blog post.