tera
tera copied to clipboard
Support for formatting
Hi,
Jinja has this nice support for formatting like:
{{ '0x%0X' % payload.id }}
It would be nice to have something like this in tera, specially for integers file types. Maybe something more rust like:
0x{{ payload.id | format(":X") }}
or
0x{{ payload.id | format=":X" }}
I would take a PR for that if it doesn't bring some big dependencies.
I need to add decimal separators to numbers, e.g. 1000 -> 1,000 or 123456 -> 123,456, which may be 123.456 in some locales. @Kixiron , would I be able to do that with PR #517?