aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* parser: move trait impl closer to type definitionLibravatar Dirkjan Ochtman2023-07-312-11/+11
|
* parser: move single-use functions into callerLibravatar Dirkjan Ochtman2023-07-311-13/+13
|
* Extract askama_parser crateLibravatar Dirkjan Ochtman2023-07-3112-46/+68
|
* derive: move whitespace conversion into config moduleLibravatar Dirkjan Ochtman2023-07-312-12/+11
|
* derive: move Parsed into parser moduleLibravatar Dirkjan Ochtman2023-07-312-36/+35
|
* derive: move generator-specific methods out of ExprLibravatar Dirkjan Ochtman2023-07-312-73/+71
|
* derive: define separate ParseError typeLibravatar Dirkjan Ochtman2023-07-314-9/+32
|
* derive: move Syntax into parser moduleLibravatar Dirkjan Ochtman2023-07-315-40/+38
|
* Fix Rust macro invocations not accepting a path (#837)Libravatar Matthew Taylor2023-07-245-19/+95
|
* There's no mention of name afterwardsLibravatar Justin Abrahms2023-07-211-1/+1
|
* fix clippy::items-after-test-module error (#839)Libravatar Matthew Taylor2023-07-141-9/+9
|
* Cache include AST to reduce parsing overheadLibravatar Dirkjan Ochtman2023-06-281-23/+16
|
* Inline child() method to avoid borrowing all fieldsLibravatar Dirkjan Ochtman2023-06-281-27/+23
|
* Avoid reparsing included templates if possibleLibravatar Dirkjan Ochtman2023-06-281-4/+23
|
* Parse templates onceLibravatar Dirkjan Ochtman2023-06-283-18/+45
|
* Add section for performance tipsLibravatar wrapperup2023-06-282-0/+17
|
* Added example on how to use super()Libravatar reportingissue2023-06-211-1/+2
|
* Update mendes requirement from 0.2.0 to 0.3.0Libravatar dependabot[bot]2023-06-131-1/+1
| | | | | | | | | | | | Updates the requirements on [mendes](https://github.com/djc/mendes) to permit the latest version. - [Commits](https://github.com/djc/mendes/commits) --- updated-dependencies: - dependency-name: mendes dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Allow macros to be defined and called without argumentsLibravatar mataha2023-06-123-2/+36
| | | | | | | | | | This commit introduces a shorthand for defining and calling macros when using them as a reusable substitute for variables assigned complex values (e.g. string literals with or without newline escapes). The use-case is formatting - from my experience it's easier to visually parse a `macro` `endmacro` block than a multiline variable assignment. Signed-off-by: mataha <mataha@users.noreply.github.com>
* Allow delimiters with arbitrary lengthLibravatar René Kijewski2023-05-312-18/+96
|
* Update criterion requirement from 0.4 to 0.5Libravatar dependabot[bot]2023-05-242-2/+2
| | | | | | | | | | | | | Updates the requirements on [criterion](https://github.com/bheisler/criterion.rs) to permit the latest version. - [Changelog](https://github.com/bheisler/criterion.rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/bheisler/criterion.rs/compare/0.4.0...0.5.0) --- updated-dependencies: - dependency-name: criterion dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Upgrade to comrak 0.18Libravatar Dirkjan Ochtman2023-05-203-2/+3
|
* Update to rocket 0.5-rc.3Libravatar Vypo Mouse2023-05-193-7/+22
|
* Improve whitespace documentationLibravatar Raimundo Saona2023-04-031-2/+27
|
* Re-export `askama::*` in `askama_tide` (#802)Libravatar René Kijewski2023-04-012-2/+2
| | | | Every integration crate but `askama_tide` exports `askama::*`. This PR makes `askama_tide` behave the same as every other `integration crate`.
* Use `try_reserve()` instead of `with_capacity()`Libravatar René Kijewski2023-03-311-1/+2
| | | | | | | | | | | | | | `String::with_capacity()` panics if the requested memory could not be allocated. `Template::render()` is fallible method, and the fact that it can panic is not documented. This commit uses `String::try_reserve()` instead, so even for an exceedingly large `SIZE_HINT` the method should not panic. In the generated code `write!()` calls will fail instead with `Err(std::fmt::Error)`. I do not test if `try_reserve()` returned an error, because the rendering might succeed anyway, if less bytes are written than estimated.
* Template::SIZE_HINT: add documentationLibravatar Jacob Hoffman-Andrews2023-03-311-1/+9
|
* Use lookup tableLibravatar René Kijewski2023-03-301-5/+13
|
* Escape HTML fasterLibravatar René Kijewski2023-03-301-29/+23
| | | | | | | | | | | | | | | | | | | | | Escaped HTML characters vary in length. So, in order to select the correct replacement two variables need to be loaded: The pointer to the new substring and its length. Because of this the generated code is less dense than it could be. With this PR instead of selecting the appropriate `&str`, an `&&str` is selected. The former consumes two words while the latter consumes only one. Intuitively one might assume that the double dereference makes the code slower, but the optimized lookup seems to be so much faster, so that the change is worth its weight. Comparing the result of `cargo bench` (best out of three runs for both): ```text Old: [4.3592 µs 4.3675 µs 4.3764 µs] New: [3.8691 µs 3.8766 µs 3.8860 µs] Diff: [-11.24 % -11.24 % -12.21 % ] ```
* Update comrak to 0.17Libravatar Dirkjan Ochtman2023-03-283-3/+4
|
* Update mendes requirement from 0.1.0 to 0.2.0Libravatar dependabot[bot]2023-03-221-1/+1
| | | | | | | | | | | | | Updates the requirements on [mendes](https://github.com/djc/mendes) to permit the latest version. - [Release notes](https://github.com/djc/mendes/releases) - [Commits](https://github.com/djc/mendes/commits) --- updated-dependencies: - dependency-name: mendes dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com>
* Extract literal from group expressions in attributesLibravatar Dirkjan Ochtman2023-03-211-0/+6
|
* Version bump askama_derive to 0.12.1Libravatar Dirkjan Ochtman2023-03-211-1/+1
|
* Upgrade to syn 2Libravatar Dirkjan Ochtman2023-03-202-28/+27
|
* Add documentation for whitespace argument in template derive proc-macroLibravatar Guillaume Gomez2023-03-131-0/+14
|
* Add tests for whitespace argument in template derive proc-macroLibravatar Guillaume Gomez2023-03-132-0/+54
|
* Add whitespace argument in template derive proc-macroLibravatar Guillaume Gomez2023-03-132-17/+39
|
* Tell user to use `cargo add`Libravatar René Kijewski2023-03-101-5/+3
|
* Update tests for whitespace characters handlingLibravatar Guillaume Gomez2023-03-093-437/+471
|
* Fix handling of trailing whitespace charactersLibravatar Guillaume Gomez2023-03-092-4/+19
|
* Add documentation for + sign in whitespace controlLibravatar Guillaume Gomez2023-03-091-0/+12
|
* Add subsections for configuration chapter (#787)Libravatar Guillaume Gomez2023-03-061-0/+4
|
* Propogate size_hint from sub-blocks (#788)Libravatar Andrew Dona-Couch -- GitHub drop ICE2023-03-065-4/+56
| | | Closes #786
* Bump versions for Askama 0.12 (#784)Libravatar Dirkjan Ochtman2023-03-0310-16/+16
|
* exchange hyper features From<Template> for hyper::Body with TryFromLibravatar Rudi Floren2023-03-032-29/+16
| | | | | | | | | The previous implementation hid the error returned by render, which made it impossible for callers to react to rendering errors. While having a simple way to call into would be nice, there is not way to have both implementations without adding any manual specialization. Thus, the From impl is replaced by the TryFrom impl.
* Fix typosLibravatar René Kijewski2023-02-242-13/+13
|
* Revert "derive: Make Config `'static`"Libravatar René Kijewski2023-02-216-69/+74
|
* Replace `toml_edit` with `basic-toml`Libravatar René Kijewski2023-02-212-3/+3
|
* Add impl From<{Template}> for hyper::Body deriveLibravatar Rudi Floren2023-02-132-6/+62
| | | | | with-hyper now derives an impl allowing Templates to be passed to functions with trait bounds for Into<hyper::Body>.
* Update comrak dependency to 0.16Libravatar René Kijewski2023-01-303-2/+3
|