Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions moban/jinja2/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@
"moban.jinja2.filters.text",
"moban.jinja2.tests.files",
]
JINJA2_THIRD_PARTY_EXTENSIONS = [
'jinja2.ext.do',
'jinja2.ext.loopcontrols',
]


class PluginMixin:
Expand Down Expand Up @@ -66,6 +70,7 @@ def __init__(self, template_dirs):
keep_trailing_newline=True,
trim_blocks=True,
lstrip_blocks=True,
extensions=JINJA2_THIRD_PARTY_EXTENSIONS,
)
for filter_name, filter_function in FILTERS.get_all():
self.jj2_environment.filters[filter_name] = filter_function
Expand Down