Skip to content

Commit 338c441

Browse files
committed
fix a jinja2 deprecation before it falls on our heads
1 parent 72f01c4 commit 338c441

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

render.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def render_task(arg):
107107
os.link(src, dst)
108108

109109

110-
@j2.contextfilter
110+
@j2.pass_context
111111
def filter_prefix(ctx, link):
112112
"""
113113
Prepend level-times "../" to the given string.
@@ -126,7 +126,7 @@ def filter_prefix(ctx, link):
126126
md = markdown.Markdown()
127127

128128

129-
@j2.evalcontextfilter
129+
@j2.pass_eval_context
130130
def filter_markdown(eval_ctx, text):
131131
if eval_ctx.autoescape:
132132
return md.convert(j2.escape(text))

0 commit comments

Comments
 (0)