Commit message (Collapse) | Author | Files | Lines | ||
---|---|---|---|---|---|
2023-11-22 | Enhance match to include multiple targets (#911) | PizzasBear | 1 | -0/+8 | |
Signed-off-by: max <gmx.sht@gmail.com> | |||||
2023-10-23 | Add test specifically for named blocks, and named macros | Guillaume Gomez | 1 | -0/+9 | |
2023-10-12 | Add test for macro self argument | max | 1 | -0/+5 | |
Signed-off-by: max <gmx.sht@gmail.com> | |||||
2023-07-24 | Fix Rust macro invocations not accepting a path (#837) | Matthew Taylor | 1 | -0/+1 | |
2023-06-12 | Allow macros to be defined and called without arguments | mataha | 1 | -0/+21 | |
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> | |||||
2023-03-06 | Propogate size_hint from sub-blocks (#788) | Andrew Dona-Couch -- GitHub drop ICE | 3 | -0/+5 | |
Closes #786 | |||||
2022-04-29 | Allow `{% endmacro name %}` | Bastien Orivel | 1 | -0/+12 | |
Just migrated a repo from tera to askama and this was one of the only things that was different. This is also coherent with `{% block %}` for which I added the same feature years ago. | |||||
2022-02-16 | Make json filter safe | René Kijewski | 1 | -1/+1 | |
Previously the built-in json filter had an issue that made it unsafe to use in HTML data. When used in HTML attributes an attacker who is able to supply an arbitrary string that should be JSON encoded could close the containing HTML element e.g. with `"</div>"`, and write arbitrary HTML code afterwards as long as they use apostrophes instead of quotation marks. The programmer could make this use case safe by explicitly escaping the JSON result: `{{data|json|escape}}`. In a `<script>` context the json filter was not usable at all, because in scripts HTML escaped entities are not parsed outside of XHTML documents. Without using the safe filter an attacker could close the current script using `"</script>"`. This PR fixes the problem by always escaping less-than, greater-than, ampersand, and apostrophe characters using their JSON unicode escape sequence `\u00xx`. Unless the programmer explicitly uses the safe filter, quotation marks are HTML encoded as `"`. In scripts the programmer should use the safe filter, otherwise not. | |||||
2021-11-29 | Allow whitespace trimming in {{raw}} blocks | René Kijewski | 1 | -0/+2 | |
2021-08-30 | Add {% break %} and {% continue %} | René Kijewski | 1 | -0/+11 | |
This PR adds `{% break %}` and `{% continue %}` statements to break out of a loop, or continue with the next element of the iterator. | |||||
2021-08-25 | Add test case for matching on Option<bool> | Restioson | 1 | -0/+8 | |
2021-07-30 | Issue #379 was fixed | René Kijewski | 2 | -0/+28 | |
This PR adds the tests by @msrd0 <git@msrd0.de> that failed before. The error was fixed somewhen between f23162a and now, so these tests serve to prevent regressions in the future. I simplified the tests very slightly to omit whitespaces in the output. | |||||
2021-07-30 | Use "target()" to parse "when" block | René Kijewski | 1 | -0/+10 | |
`target()` as used in parsing "let" and "if let" implements parsing nested tuples and structs. But it does not implement parsing literals. The functions `match_variant()` and `with_parameters()` as used in parsing "when" blocks do not implement parsing nested structs, but it implements parsing literals. This PR combines `match_variant()` and `with_parameters()` into `target()`, so that all `{%when%}` support nested structs, too. | |||||
2021-07-05 | Add tuple destructoring tests | René Kijewski | 1 | -0/+3 | |
2021-07-02 | Replace rust_macro test to work on nightly | René Kijewski | 1 | -3/+3 | |
The current rust_test uses `stringify!()`. The documentation gives us the warning: > Note that the expanded results of the input tokens may change in the > future. You should be careful if you rely on the output. In the current nightly rust the result was indeed changed, so the test not fails. This PR replaces the test with another macro, that does not depend on `stringify!()`. Closes issue #504. | |||||
2021-07-01 | Add "if let" tests | René Kijewski | 4 | -0/+10 | |
2021-06-22 | Fix code generation for macro calls that store args in variables. | Ryan Kelly | 1 | -0/+9 | |
2021-03-10 | Added path and ext tests | vallentin | 3 | -0/+3 | |
2020-12-25 | Added let shadow test | vallentin | 1 | -0/+22 | |
2020-12-01 | Improved if statement generation to avoid issues with implicit borrows (#392) | Christian Vallentin | 1 | -0/+51 | |
* Changed to automatically coerce to bool * Added new test case * Updated test case to include else if | |||||
2020-12-01 | Fixed implicit borrow of expressions (#390) | Christian Vallentin | 1 | -0/+9 | |
2020-08-25 | Use efficient method for nested template rendering | Dirkjan Ochtman | 1 | -3/+3 | |
2020-07-20 | Fix additional clippy issue | Dirkjan Ochtman | 1 | -1/+1 | |
2020-07-20 | Clean up clippy issues | Dirkjan Ochtman | 1 | -2/+1 | |
2020-06-30 | Add tests for allow whitespaces patch | Ciprian Dorin Craciun | 1 | -0/+63 | |
2020-01-29 | Move Iron integration into a separate askama_iron crate | Dirkjan Ochtman | 1 | -1/+0 | |
2020-01-12 | Add new templates | Dirkjan Ochtman | 2 | -0/+6 | |
2020-01-12 | Support escaping in string literals | Tuomas Siipola | 1 | -0/+2 | |
Do not attempt to parse escape sequences thoroughly. Instead let the Rust compiler to check the string literals and provide nice error messages if necessary. | |||||
2020-01-03 | Support char literals | Tuomas Siipola | 2 | -0/+9 | |
2019-10-09 | Reformat test for better readability | Dirkjan Ochtman | 1 | -15/+3 | |
2019-10-09 | Limit test sensitivity to macro pretty printing output | Dirkjan Ochtman | 1 | -14/+3 | |
See https://github.com/rust-lang/rust/issues/65207. | |||||
2019-10-08 | Add support for boolean literals | Dave Poulter | 1 | -0/+2 | |
2019-04-18 | WIP: Add raw block | Pavel Fokin | 2 | -0/+8 | |
2019-03-18 | Move small templates into source code | Dirkjan Ochtman | 2 | -4/+0 | |
2019-03-18 | Documenting feature render in template | Vicente Ramirez Perea | 3 | -0/+10 | |
2019-01-08 | Add support for loop.last | yossyJ | 2 | -2/+2 | |
2019-01-08 | Allow trailing commas in tuples (#188) | yossyJ | 1 | -1/+1 | |
2019-01-04 | Add support for tuple | yossyJ | 2 | -0/+4 | |
2018-12-13 | fix rust macro arguments | Juan Aguilar Santillana | 1 | -0/+26 | |
2018-12-12 | Allow using brackets for enums in `match` | mcarton | 1 | -2/+2 | |
2018-10-20 | Add test for unescaped variable expressions (see #132) | Qian Linfeng | 1 | -0/+5 | |
2018-10-08 | Clean up warning about unused field | Dirkjan Ochtman | 1 | -1/+1 | |
2018-10-07 | Add Rust macro support at templates | bott | 1 | -0/+1 | |
2018-09-21 | fix panicked on range-based for loop | bott | 1 | -0/+15 | |
2018-09-14 | Fix operator preference at loop.index | bott | 1 | -1/+1 | |
2018-09-14 | Fix operator preference at loop.first | bott | 1 | -0/+3 | |
2018-09-07 | Fix deep nested imports in macro calls | bott | 3 | -2/+8 | |
2018-09-02 | Fix multiple nesting in macro calls into different scopes | bott | 1 | -2/+6 | |
2018-09-02 | Add test for nested macro calls into different scope | bott | 2 | -0/+9 | |
2018-06-28 | Add benchmarks to the Askama repo | Dirkjan Ochtman | 2 | -0/+20 | |