tera
tera copied to clipboard
A template engine for Rust based on Jinja2/Django
Hi, In recent days while developing our internal project with the use of Tera, we've found (probably) a bug connected with expressions including multiple nested parentheses. For example, the following...
I've looked through the docs, examples and some of the issues that might point me the way. This all said, I'm at a loss to figure this out. I can...
I wanted to get the site name (as in, no protocol prefix) from `config.base_url`. It'd be nice to use `replace` filter for this. Right now I have `config.base_url|split(pat='/')|last`. :D
When rendering with an invalid template that refers to an `Object` instead of strings/integers/bools/arrays, the rendering silent fails by rendering "`[object]`", due to: https://github.com/Keats/tera/blob/b91a985951fccf6896c7192ea7c78ba64608bb62/src/context.rs#L119 (by the way, this could be...
According to the documentation "macro arguments can have a default [literal](https://tera.netlify.app/docs/#literals) value." Also, array literals are a documented thing. However, when I try to give a macro definition an array...
I was writing a macro using recursive calls and it seems that macros are unable to access the self:: namespace. I have a base.html file, which is extended by a...
* Added the `dbg` filter which prints the passed value to stdout (similar to the `dbg!()` macro) * Added the `format` filter, which offers various integer formatting routines such as...
Currently, custom functions and filters must take dynamic values. However, it would be nice to be able to register filters and functions that take and return any rust type that...
* Docs : Clarify `addslashes` filter * Docs : Clarify `slugify` filter * Docs : Clarify `trim_start_matches` & `trim_end_matches` filters * Docs : Clarify `sort` filter * Docs: Clarify `filesizeformat`...
Hi! 1. Unique filter should be able to handle array with mixed types. E.g. ``` {{ [1, "foo", 1, true, "FOO", true, 2, "true"] | unique }} ``` Currently, this...