Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | parser: simplify top-level parser match | Dirkjan Ochtman | 2023-07-31 | 1 | -29/+24 | |
| | ||||||
* | parser: add top-level Ast type | Dirkjan Ochtman | 2023-07-31 | 2 | -115/+148 | |
| | ||||||
* | parser: move nested_parenthesis() helper into node module | Dirkjan Ochtman | 2023-07-31 | 2 | -51/+49 | |
| | ||||||
* | parser: move helper functions into State impl | Dirkjan Ochtman | 2023-07-31 | 2 | -93/+92 | |
| | ||||||
* | parser: move trait impl closer to type definition | Dirkjan Ochtman | 2023-07-31 | 2 | -11/+11 | |
| | ||||||
* | parser: move single-use functions into caller | Dirkjan Ochtman | 2023-07-31 | 1 | -13/+13 | |
| | ||||||
* | Extract askama_parser crate | Dirkjan Ochtman | 2023-07-31 | 12 | -46/+68 | |
| | ||||||
* | derive: move whitespace conversion into config module | Dirkjan Ochtman | 2023-07-31 | 2 | -12/+11 | |
| | ||||||
* | derive: move Parsed into parser module | Dirkjan Ochtman | 2023-07-31 | 2 | -36/+35 | |
| | ||||||
* | derive: move generator-specific methods out of Expr | Dirkjan Ochtman | 2023-07-31 | 2 | -73/+71 | |
| | ||||||
* | derive: define separate ParseError type | Dirkjan Ochtman | 2023-07-31 | 4 | -9/+32 | |
| | ||||||
* | derive: move Syntax into parser module | Dirkjan Ochtman | 2023-07-31 | 5 | -40/+38 | |
| | ||||||
* | Fix Rust macro invocations not accepting a path (#837) | Matthew Taylor | 2023-07-24 | 5 | -19/+95 | |
| | ||||||
* | There's no mention of name afterwards | Justin Abrahms | 2023-07-21 | 1 | -1/+1 | |
| | ||||||
* | fix clippy::items-after-test-module error (#839) | Matthew Taylor | 2023-07-14 | 1 | -9/+9 | |
| | ||||||
* | Cache include AST to reduce parsing overhead | Dirkjan Ochtman | 2023-06-28 | 1 | -23/+16 | |
| | ||||||
* | Inline child() method to avoid borrowing all fields | Dirkjan Ochtman | 2023-06-28 | 1 | -27/+23 | |
| | ||||||
* | Avoid reparsing included templates if possible | Dirkjan Ochtman | 2023-06-28 | 1 | -4/+23 | |
| | ||||||
* | Parse templates once | Dirkjan Ochtman | 2023-06-28 | 3 | -18/+45 | |
| | ||||||
* | Add section for performance tips | wrapperup | 2023-06-28 | 2 | -0/+17 | |
| | ||||||
* | Added example on how to use super() | reportingissue | 2023-06-21 | 1 | -1/+2 | |
| | ||||||
* | Update mendes requirement from 0.2.0 to 0.3.0 | dependabot[bot] | 2023-06-13 | 1 | -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 arguments | mataha | 2023-06-12 | 3 | -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 length | René Kijewski | 2023-05-31 | 2 | -18/+96 | |
| | ||||||
* | Update criterion requirement from 0.4 to 0.5 | dependabot[bot] | 2023-05-24 | 2 | -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.18 | Dirkjan Ochtman | 2023-05-20 | 3 | -2/+3 | |
| | ||||||
* | Update to rocket 0.5-rc.3 | Vypo Mouse | 2023-05-19 | 3 | -7/+22 | |
| | ||||||
* | Improve whitespace documentation | Raimundo Saona | 2023-04-03 | 1 | -2/+27 | |
| | ||||||
* | Re-export `askama::*` in `askama_tide` (#802) | René Kijewski | 2023-04-01 | 2 | -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()` | René Kijewski | 2023-03-31 | 1 | -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 documentation | Jacob Hoffman-Andrews | 2023-03-31 | 1 | -1/+9 | |
| | ||||||
* | Use lookup table | René Kijewski | 2023-03-30 | 1 | -5/+13 | |
| | ||||||
* | Escape HTML faster | René Kijewski | 2023-03-30 | 1 | -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.17 | Dirkjan Ochtman | 2023-03-28 | 3 | -3/+4 | |
| | ||||||
* | Update mendes requirement from 0.1.0 to 0.2.0 | dependabot[bot] | 2023-03-22 | 1 | -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 attributes | Dirkjan Ochtman | 2023-03-21 | 1 | -0/+6 | |
| | ||||||
* | Version bump askama_derive to 0.12.1 | Dirkjan Ochtman | 2023-03-21 | 1 | -1/+1 | |
| | ||||||
* | Upgrade to syn 2 | Dirkjan Ochtman | 2023-03-20 | 2 | -28/+27 | |
| | ||||||
* | Add documentation for whitespace argument in template derive proc-macro | Guillaume Gomez | 2023-03-13 | 1 | -0/+14 | |
| | ||||||
* | Add tests for whitespace argument in template derive proc-macro | Guillaume Gomez | 2023-03-13 | 2 | -0/+54 | |
| | ||||||
* | Add whitespace argument in template derive proc-macro | Guillaume Gomez | 2023-03-13 | 2 | -17/+39 | |
| | ||||||
* | Tell user to use `cargo add` | René Kijewski | 2023-03-10 | 1 | -5/+3 | |
| | ||||||
* | Update tests for whitespace characters handling | Guillaume Gomez | 2023-03-09 | 3 | -437/+471 | |
| | ||||||
* | Fix handling of trailing whitespace characters | Guillaume Gomez | 2023-03-09 | 2 | -4/+19 | |
| | ||||||
* | Add documentation for + sign in whitespace control | Guillaume Gomez | 2023-03-09 | 1 | -0/+12 | |
| | ||||||
* | Add subsections for configuration chapter (#787) | Guillaume Gomez | 2023-03-06 | 1 | -0/+4 | |
| | ||||||
* | Propogate size_hint from sub-blocks (#788) | Andrew Dona-Couch -- GitHub drop ICE | 2023-03-06 | 5 | -4/+56 | |
| | | | Closes #786 | |||||
* | Bump versions for Askama 0.12 (#784) | Dirkjan Ochtman | 2023-03-03 | 10 | -16/+16 | |
| | ||||||
* | exchange hyper features From<Template> for hyper::Body with TryFrom | Rudi Floren | 2023-03-03 | 2 | -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 typos | René Kijewski | 2023-02-24 | 2 | -13/+13 | |
| |