add format_rev plugin
This commit is contained in:
parent
1aba1e5606
commit
9f850aa4da
1 changed files with 12 additions and 0 deletions
12
filter_plugins/format_rev.py
Normal file
12
filter_plugins/format_rev.py
Normal 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)
|
Loading…
Reference in a new issue