diff --git a/filter_plugins/format_rev.py b/filter_plugins/format_rev.py new file mode 100644 index 0000000..16902fb --- /dev/null +++ b/filter_plugins/format_rev.py @@ -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)