aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Add poem integrationHEADmainLibravatar cel 🌸2024-01-2415-3/+118
|
* Mention that whitespace control is not allowed on `extends` in the bookLibravatar Guillaume Gomez2024-01-221-0/+10
|
* Add ui test for `extends` errorLibravatar Guillaume Gomez2024-01-222-0/+37
|
* Improve error when whitespace control is used on `extends`Libravatar Guillaume Gomez2024-01-221-2/+16
|
* Bump version numbers for releaseLibravatar Dirkjan Ochtman2024-01-182-2/+2
|
* Fix support for mixed case variablesLibravatar Dirkjan Ochtman2024-01-182-4/+24
|
* docs: fix a typoLibravatar Marcos Brito2024-01-181-1/+1
|
* Yield error on deep AST recursionLibravatar Dirkjan Ochtman2024-01-183-3/+16
|
* Improve performance of `find_used_templates`Libravatar max2024-01-172-3/+9
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Deduplicating some code in `find_used_templates`Libravatar max2024-01-171-6/+9
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Allow included templates to `extend`, `import`, and `macro`Libravatar max2024-01-179-58/+158
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Refactored `match node` in `find_used_templates`Libravatar max2024-01-171-3/+17
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* parser: add missing license filesLibravatar Fabio Valentini2024-01-152-0/+2
|
* Generator: make `normalize_identifier` faster (#946)Libravatar René Kijewski2024-01-123-54/+804
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `normalize_identifier` is called quite often in the generator, once for every variable name or path element that is written. This PR aims to speed up the function by * using a per-length input string length replacement map * binary searching the replacement map instead of a linear search Diffent, but functionally equivalent implementations were compared: ```text * linear search in one big map: 348.44 µs * binary search in one big map: 334.46 µs * linear search in a per-length map: 178.84 µs * binary search in a per-length map: 154.54 µs * perfect hashing: 170.87 µs ``` The winner of this competition is "binary search in a per-length map". It does not introduce new dependencies, but has the slight disadvantage that it uses one instance of `unsafe` code. I deem this disadvantage acceptable, though. Nb. It was also tested if a variant that only stores the replaced string would be faster. This "optimization" proved to be slower for all implementations except "binary search in a per-length map", for which it has the same runtime. Without a clear advantage to use the "optimized version", I chose to use the more easy to read slice of tuples variant. Obviously, for all measurements: YMMV.
* Add documentation for `as_ref` builtin filterLibravatar Guillaume Gomez2024-01-121-0/+18
|
* Add test for `as_ref` builtin filterLibravatar Guillaume Gomez2024-01-121-0/+14
|
* Add `as_ref` builtin filterLibravatar Guillaume Gomez2024-01-121-0/+17
|
* parser: add test for target recursion overflowLibravatar Dirkjan Ochtman2024-01-112-0/+6
|
* parser: limit target recursionLibravatar Dirkjan Ochtman2024-01-111-14/+25
|
* Revert "Add automatic borrowing to let statement"Libravatar Guillaume Gomez2024-01-102-21/+0
| | | | This reverts commit 3d52283b74573af509deb3c47cbabf7b7b58b1dd.
* Make the `markdown` filter compatible with `String`Libravatar Jakub Stachurski2024-01-092-1/+19
| | | | | | | | | | | | | | | | | This commit solves issue #719. This is done by making the markdown filter borrow the string and simplifying the filter to accept `&str` instead of `AsRef<str>` Add test for the markdown filter using as input Revert markdown filter changes Revert unnecessary changes Improve test_markdown_owned_string test Use cargo fmt
* Fix typoLibravatar Sadika Sumanapala2023-12-181-1/+1
|
* Bump askama_derive version to 0.12.4Libravatar Dirkjan Ochtman2023-12-181-1/+1
|
* Make API more idiomaticLibravatar Dirkjan Ochtman2023-12-182-4/+4
|
* Unbreak reading config from default locationLibravatar Dirkjan Ochtman2023-12-182-6/+8
| | | | | | I broke this in 2a4d58cbb2033114890415c98a61e730185d1f83 due to refactoring for better internal abstractions in askama_derive. We also don't currently have any tests for the default config path.
* Prepare askama_derive and _parser releasesLibravatar Dirkjan Ochtman2023-12-182-3/+3
|
* Add automatic borrowing to let statementLibravatar max2023-12-132-0/+21
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Bugfix in `is_attr_self()`Libravatar max2023-12-132-1/+20
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Allow trailing comma in macro definition and callLibravatar Guillaume Gomez2023-12-073-2/+32
|
* Undo an accidental deletion of `#[derive(Debug)]`Libravatar max2023-12-071-0/+1
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Added testing for reserved variable namesLibravatar max2023-12-072-5/+20
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Add macro test with only argument being passed as namedLibravatar Guillaume Gomez2023-12-071-0/+17
|
* build(deps): update comrak requirement from 0.18 to 0.20Libravatar dependabot[bot]2023-11-302-2/+2
| | | | | | | | | | | | | | Updates the requirements on [comrak](https://github.com/kivikakk/comrak) to permit the latest version. - [Release notes](https://github.com/kivikakk/comrak/releases) - [Changelog](https://github.com/kivikakk/comrak/blob/main/changelog.txt) - [Commits](https://github.com/kivikakk/comrak/compare/0.18.0...0.20.0) --- updated-dependencies: - dependency-name: comrak dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Upgrade to comrak 0.19Libravatar Dirkjan Ochtman2023-11-304-51/+19
|
* Add documentation for macro named argumentsLibravatar Guillaume Gomez2023-11-281-3/+48
|
* Add tests for named arguments in macro callsLibravatar Guillaume Gomez2023-11-283-0/+117
|
* Allow to pass named arguments to macro callsLibravatar Guillaume Gomez2023-11-283-7/+130
|
* askama_axum: update axum to 0.7 (#918)Libravatar lictex_2023-11-272-6/+8
|
* askama_rocket: Rocket v0.5.0Libravatar Philippe Loctaux2023-11-271-1/+1
|
* Add better support for rust-like number literals (#908)Libravatar PizzasBear2023-11-223-5/+99
| | | Signed-off-by: max <gmx.sht@gmail.com>
* Enhance match to include multiple targets (#911)Libravatar PizzasBear2023-11-224-0/+60
| | | Signed-off-by: max <gmx.sht@gmail.com>
* Add UI tests for macros error messageLibravatar Guillaume Gomez2023-11-202-0/+50
|
* Improve macro call arguments loopLibravatar Guillaume Gomez2023-11-201-4/+1
|
* Improve output error for non-matching number of arguments for macrosLibravatar Guillaume Gomez2023-11-201-1/+8
|
* Derive Clone for Expr and TargetLibravatar Andrew Dona-Couch2023-11-132-2/+2
|
* add support for svg file extensionLibravatar Marvin Jütte2023-11-092-3/+9
|
* Add missing link to template expansionLibravatar Guillaume Gomez2023-11-071-0/+1
|
* Add new chapter in the askama book about template expansionLibravatar Guillaume Gomez2023-11-071-0/+485
|
* document function syntax in templatesLibravatar Thomas Threadgold2023-11-071-0/+116
|
* Remove unused `_did_loop` condition if `else` block is emptyLibravatar Guillaume Gomez2023-11-011-9/+21
|