add format_rev plugin

This commit is contained in:
jeltz 2023-01-07 08:59:16 +01:00
parent 1aba1e5606
commit 9f850aa4da
Signed by: jeltz
GPG key ID: 800882B66C0C3326

View file

@ -0,0 +1,12 @@
from jinja2.utils import soft_unicode
class FilterModule:
def filters(self):
return {
"format_rev": format_rev,
}
def format_rev(text, fmt, *args, **kwargs):
return fmt.format(text, *args, **kwargs)