aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tests/macro.rs (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add test for macro self argumentLibravatar max2023-10-121-0/+12
| | | | Signed-off-by: max <gmx.sht@gmail.com>
* Allow macros to be defined and called without argumentsLibravatar mataha2023-06-121-0/+10
| | | | | | | | | | 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 `{% endmacro name %}`Libravatar Bastien Orivel2022-04-291-1/+1
| | | | | | 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.
* Issue #379 was fixedLibravatar René Kijewski2021-07-301-0/+10
| | | | | | | | 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.
* Fix code generation for macro calls that store args in variables.Libravatar Ryan Kelly2021-06-221-0/+10
|
* Fixed implicit borrow of expressions (#390)Libravatar Christian Vallentin2020-12-011-0/+10
|
* Use 2018 edition idiomsLibravatar Dirkjan Ochtman2018-12-081-2/+0
|
* Remove unused macro_use attributesLibravatar Dirkjan Ochtman2018-12-081-1/+0
|
* Fix deep nested imports in macro callsLibravatar bott2018-09-071-0/+10
|
* Add test for nested macro calls into different scopeLibravatar bott2018-09-021-0/+10
|
* Fix whitespace handling for macros and imports (#55)Libravatar larros2017-10-011-1/+1
| | | | | | Resolves https://github.com/djc/askama/issues/52. * Fix of review comments
* Add support for importing template files with macros (#51)Libravatar larros2017-09-261-0/+12
| | | | * Fix review comments for macro imports
* Forgot to remove debugging cruft, againLibravatar Dirkjan Ochtman2017-08-231-1/+1
|
* Add test for basic macro useLibravatar Dirkjan Ochtman2017-08-221-0/+16