Releases: askama-rs/askama
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
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.
v0.13.0 – Rinja is Askama, again!
With this release, the fork rinja got merged back into the main project. Please have a look at our blog post for more information about the split and the merge.
What's Changed
This release (v0.13.0), when compared to the last stable askama release (v0.12.1), consists of:
- over 1000 commits
- with changes in over 500 files
- with over 40k additions and 8000 deletions
Compared to rinja v0.3.5
- Rename
rinjaintoaskamaby @GuillaumeGomez in #353 - Bump version number to 0.13.0 by @Kijewski in #382
Major added and improved features:
- Add support for "runtime" values by @GuillaumeGomez in #311
- Implement
enumvariants by @Kijewski in #255 - Relax
filesizeformatfilter requirements by @GuillaumeGomez in #216 - derive: implement template attribute
blocksby @Kijewski in #337 - Add concat operator
~by @Kijewski in #236 - Remove restriction preventing to have | surrounded by whistespace characters by @GuillaumeGomez in #250
- Make rinja
#![no_std]compatible by @Kijewski in #286 - Make
deriveoptional by @Kijewski in #342
More added and improved features:
- Let
FastWritablepropagate custom errors by @Kijewski in #217 - Implement
PrimitiveTypefor non-zero integers by @Kijewski in #220 - Implement
AsIndentforNonZeroUsizeandWrapping<usize>by @Kijewski in #221 - Implement
HtmlSafefor all reference wrappers by @Kijewski in #219 - Add support for default value in macros by @GuillaumeGomez in #207
- parser: allow whitespace control on
extendsby @Kijewski in #241 - Allow idents to start with
_by @GuillaumeGomez in #244 std::num::Saturatingis stable since rust 1.74 by @Kijewski in #270- Make working with
Errors a bit easier by @Kijewski in #277 - Add full support for if let chain feature by @GuillaumeGomez in #296
- Make filters
|fmtand|formatavailable with feature"alloc", but without"std"by @Kijewski in #319 - Add support for generics syntax in parser by @GuillaumeGomez in #317
- derive: add ".askama" to list of HTML extensions by @Kijewski in #321
- derive: for
enums, letSelfrefer to the original type by @Kijewski in #333 - derive: add option to specify
rinjapath by @Kijewski in #334 - Implement
Valuesfor all collection types by @Kijewski in #346 - Revive
askama_escapedby @Kijewski in #378
Removed features:
- Remove
EXTENSIONconstant fromTemplateby @Kijewski in #252 - parser: remove obsolete parser fuzzing by @Kijewski in #261
- Remove integrations and
MIME_TYPEguessing by @Kijewski in #271 - parser: deny all rust keywords as target names and add
gento keywords by @Kijewski in #294
Performance:
- Omit
fmt::Formattermachinery in URL encoding by @Kijewski in #218 - filters: don't collect into intermediate
Stringif we can help it by @Kijewski in #235 - parser: use built-in whitespace trimming by @Kijewski in #238
- derive: some clean-ups and optimizations by @Kijewski in #260
- parser: shrink the size of
WithSpanto one register by @Kijewski in #257 - derive: less
format!(), shorter context on error by @Kijewski in #276 - Speed-up HTML escaping a bit by @Kijewski in #301
- Remove intermediate allocations for error messages by @Kijewski in #322
- derive: some optimizations by @Kijewski in #338
- Allow parallel compilation of
serdeandserde_deriveby @Kijewski in #343
Safety and correctness:
- parser: reject excessively long syntax delimiters by @Kijewski in #230
- derive: reject
unions as they requireunsafecode by @Kijewski in #231 - Canonicalize include paths before emitting by @Kijewski in #258
- fix: normalize macro args on call (fixes #259) by @chrisp60 in #262
- derive: a safe-guard to disable bindings a unit struct was expected by @Kijewski in #269
- Canonicalize paths to ensure includes behave as expected when folders are involved by @LukeMathWalker in #289
- derive: reserve variable prefix
__rinjaand free namewriterby @Kijewski in #292 - parser: use drop guards to track nesting level by @Kijewski in #297
- parser: fix excessive filter blocks by @Kijewski in #304
- parser: add missing level guard in
if letby @Kijewski in #332 - Replace
from_utf8_unsafe()withAsciiStrby @Kijewski in #351 - Allow variables inheritance in block by @GuillaumeGomez in #264
- Fix minimum supported
synversion by @paolobarbolini in #379
Documentation, our book, and examples:
- Fix crate version numbers in book by @BD103 in #212
- Add link to blog post for differences between rinja and askama by @GuillaumeGomez in #233
- book: pin to mdbook v0.4.40 for now and add table of contents to pages by @Kijewski in #240
- Fix integrations book chapter by @GuillaumeGomez in #249
- Add missing "Escapers" title in the book by @GuillaumeGomez in #248
- book: add
upgrading.mdby @Kijewski in #303 - book: document
blocksby @Kijewski in #340 - Add bleeding edge API documentation to rtd by @Kijewski in #363
- docs: update twig's URL by @Kijewski in #364
- Update askama_playground URL by @Kijewski in #368
- book: mention
askama_webby @Kijewski in #369 - book: fix article link by @Kijewski in #372
- fix toml features field in the filters chapter of the book by @bionicles in #373
- Add link to blog post explaining merge of rinja and askama by @GuillaumeGomez in #374
- Remove "Using integrations" part in book by @GuillaumeGomez in #310
- examples: add {axum,poem,rocket,warp} by translating the actix-web example; book: add frameworks section by @Kijewski in #308
- Add salvo example by translating the axum example by @Kijewski in #313
- docs: fix recursive example in template_syntax.md by @m4tx in #315
- book: a features section by @Kijewski in #316
- "object safe" is now "dyn-compatible" by @Kijewski in #199
- Rename
Escaperargumentfmtintodestby @Kijewski in #349
Testing:
- Move types into their tests by @GuillaumeGomez in #228
- ci: add cluster-fuzz integration by @Kijewski in #229
- ci: group checks in fast, average and slow by @Kijewski in #305
- Update ui tests for rust 1.84, and deprecations in winnow 0.6.24 by @Kijewski in #312
- ci: ignore typos in librustdoc sources by @Kijewski in #360
- Add failing test from issue 272 by @Kijewski in #278
- Update fuzzing corpus URL by @Kijewski in #361
- ci: re-enable
Cluster-Fuzzby @Kijewski in #376 - ci: ensure that github CI ...
v0.13.0-pre.0
What's Changed
This pre-release, when compared to the last stable askama release (v0.12.1), consists of:
- over 1000 commits
- with changes in over 500 files
- with over 40k additions and 8000 deletions
Compared to rinja v0.3.5
- Rename
rinjaintoaskamaby @GuillaumeGomez in #353 - Bump version number to v0.13.0-pre.0 by @Kijewski in #370
Major added and improved features:
- Add support for "runtime" values by @GuillaumeGomez in #311
- Implement
enumvariants by @Kijewski in #255 - Relax
filesizeformatfilter requirements by @GuillaumeGomez in #216 - derive: implement template attribute
blocksby @Kijewski in #337 - Add concat operator
~by @Kijewski in #236 - Remove restriction preventing to have | surrounded by whistespace characters by @GuillaumeGomez in #250
- Make rinja
#![no_std]compatible by @Kijewski in #286 - Make
deriveoptional by @Kijewski in #342
More added and improved features:
- Let
FastWritablepropagate custom errors by @Kijewski in #217 - Implement
PrimitiveTypefor non-zero integers by @Kijewski in #220 - Implement
AsIndentforNonZeroUsizeandWrapping<usize>by @Kijewski in #221 - Implement
HtmlSafefor all reference wrappers by @Kijewski in #219 - Add support for default value in macros by @GuillaumeGomez in #207
- parser: allow whitespace control on
extendsby @Kijewski in #241 - Allow idents to start with
_by @GuillaumeGomez in #244 std::num::Saturatingis stable since rust 1.74 by @Kijewski in #270- Make working with
Errors a bit easier by @Kijewski in #277 - Add full support for if let chain feature by @GuillaumeGomez in #296
- Make filters
|fmtand|formatavailable with feature"alloc", but without"std"by @Kijewski in #319 - Add support for generics syntax in parser by @GuillaumeGomez in #317
- derive: add ".askama" to list of HTML extensions by @Kijewski in #321
- derive: for
enums, letSelfrefer to the original type by @Kijewski in #333 - derive: add option to specify
rinjapath by @Kijewski in #334 - Implement
Valuesfor all collection types by @Kijewski in #346
Removed features:
- Remove
EXTENSIONconstant fromTemplateby @Kijewski in #252 - parser: remove obsolete parser fuzzing by @Kijewski in #261
- Remove integrations and
MIME_TYPEguessing by @Kijewski in #271 - parser: deny all rust keywords as target names and add
gento keywords by @Kijewski in #294
Performance:
- Omit
fmt::Formattermachinery in URL encoding by @Kijewski in #218 - filters: don't collect into intermediate
Stringif we can help it by @Kijewski in #235 - parser: use built-in whitespace trimming by @Kijewski in #238
- derive: some clean-ups and optimizations by @Kijewski in #260
- parser: shrink the size of
WithSpanto one register by @Kijewski in #257 - derive: less
format!(), shorter context on error by @Kijewski in #276 - Speed-up HTML escaping a bit by @Kijewski in #301
- Remove intermediate allocations for error messages by @Kijewski in #322
- derive: some optimizations by @Kijewski in #338
- Allow parallel compilation of
serdeandserde_deriveby @Kijewski in #343
Safety and correctness:
- parser: reject excessively long syntax delimiters by @Kijewski in #230
- derive: reject
unions as they requireunsafecode by @Kijewski in #231 - Canonicalize include paths before emitting by @Kijewski in #258
- fix: normalize macro args on call (fixes #259) by @chrisp60 in #262
- derive: a safe-guard to disable bindings a unit struct was expected by @Kijewski in #269
- Canonicalize paths to ensure includes behave as expected when folders are involved by @LukeMathWalker in #289
- derive: reserve variable prefix
__rinjaand free namewriterby @Kijewski in #292 - parser: use drop guards to track nesting level by @Kijewski in #297
- parser: fix excessive filter blocks by @Kijewski in #304
- parser: add missing level guard in
if letby @Kijewski in #332 - Replace
from_utf8_unsafe()withAsciiStrby @Kijewski in #351 - Allow variables inheritance in block by @GuillaumeGomez in #264
Documentation, our book, and examples:
- Fix crate version numbers in book by @BD103 in #212
- Add link to blog post for differences between rinja and askama by @GuillaumeGomez in #233
- book: pin to mdbook v0.4.40 for now and add table of contents to pages by @Kijewski in #240
- Fix integrations book chapter by @GuillaumeGomez in #249
- Add missing "Escapers" title in the book by @GuillaumeGomez in #248
- book: add
upgrading.mdby @Kijewski in #303 - book: document
blocksby @Kijewski in #340 - Add bleeding edge API documentation to rtd by @Kijewski in #363
- docs: update twig's URL by @Kijewski in #364
- Update askama_playground URL by @Kijewski in #368
- book: mention
askama_webby @Kijewski in #369 - book: fix article link by @Kijewski in #372
- fix toml features field in the filters chapter of the book by @bionicles in #373
- Add link to blog post explaining merge of rinja and askama by @GuillaumeGomez in #374
- Remove "Using integrations" part in book by @GuillaumeGomez in #310
- examples: add {axum,poem,rocket,warp} by translating the actix-web example; book: add frameworks section by @Kijewski in #308
- Add salvo example by translating the axum example by @Kijewski in #313
- docs: fix recursive example in template_syntax.md by @m4tx in #315
- book: a features section by @Kijewski in #316
- "object safe" is now "dyn-compatible" by @Kijewski in #199
- Rename
Escaperargumentfmtintodestby @Kijewski in #349
Testing:
- Move types into their tests by @GuillaumeGomez in #228
- ci: add cluster-fuzz integration by @Kijewski in #229
- ci: group checks in fast, average and slow by @Kijewski in #305
- Update ui tests for rust 1.84, and deprecations in winnow 0.6.24 by @Kijewski in #312
- ci: ignore typos in librustdoc sources by @Kijewski in #360
- Add failing test from issue 272 by @Kijewski in #278
- Update fuzzing corpus URL by @Kijewski in #361
Migrate to from nom to winnow
- Migrate to from Nom 7 to Winnow 0.3 by @epage in #209
- Upgrade from Winnow 0.3 to 0.4 by @epage in #210
- refactor(parser): Clean up prep for 0.5 by @epage in #213
- refactor(parser): Clean up prep for 0.5 by @epage in #226
- refactor(parser): Move off of deprecated re-export by @epage in #234
- refactor(parser): Remove redundant closure by @epage in #242
- refactor(parser): Be expl...