tera
tera copied to clipboard
A template engine for Rust based on Jinja2/Django
Hi! So after using Tera I got to the same problem as discussed in #265, which is to expand a block multiple times. Since a new [`useblock` tag](https://github.com/Keats/tera/issues/265#issuecomment-442858181) was the...
```html {%- include "a.html" -%} ``` ```html ``` Produces ```html ``` Instead of ```html ``` The whitespace creates an issue in https://github.com/rust-lang/docs.rs/blob/cdc7a5367f4dcf6517e42378e3c9bd1f470bd947/templates/rustdoc/topbar.html#L6-L8 which creates an extra whitespace in docs.rs, although...
Currently `Tera.register_function()` requires the function to have a `'static` lifetime. It would be nice if this wasn't the case, so you could use e.g. closures with borrowed data.
Currently, the `default` filter only return the given `value` if the variable evaluated is not present in the context. It would be great if this behavior could be extended so...
Hi! I have a situation, where it would be useful to have a global variable in the functions. I faced it when working with translations / localization using fluent. Basically...
I think Tera needs some kind of logo, so it would be able to have a file icon in editors like VSCode (with extensions probably), it makes it much easier...
Parsing of following expression fails: ((3) - (5)) (Doesn’t matter if literal or identifiers are used in place of 3 and 5). Following expression however is correctly parsed: ((3 -...
Jinja2 has the concept of [extensions](https://jinja.palletsprojects.com/en/2.11.x/extensions/#extensions) that you can define yourself (templatetags in django). It would be interesting to get that feature into tera as well. Semi-related; I was exploring...
Inheritance breaks macro imports with "Macro namespace `macros` was not found in template `parent`"
Tested on 5dc12afc4e0e506183898fc56d3bdc9ce6a0b6d7 (current HEAD) and 1.3.1 off Crates.io. Given the following setup: ```twig {# parent #} {% block henlo %} henlo {% endblock %} {# macro #} {% macro...
Fix https://github.com/Keats/tera/issues/484. It makes globwalk optional. It reduced the build time, but not the wasm size, which was my main goal.