mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 04:53:36 +00:00
jinja2: Use function interface for render_markdown_path.
Apparently, the filters implementation was doing some sort of strange caching, where you would need to restart the server in order to refresh for changes to the markdown content. We fix this by switching to just calling the render_markdown_path function from Jinja2. Fixes #5974.
This commit is contained in:
@@ -20,6 +20,7 @@ def environment(**options):
|
||||
env.globals.update({
|
||||
'static': staticfiles_storage.url,
|
||||
'url': reverse,
|
||||
'render_markdown_path': render_markdown_path,
|
||||
'minified_js': minified_js,
|
||||
})
|
||||
|
||||
@@ -28,6 +29,5 @@ def environment(**options):
|
||||
env.filters['slugify'] = slugify
|
||||
env.filters['pluralize'] = pluralize
|
||||
env.filters['display_list'] = display_list
|
||||
env.filters['render_markdown_path'] = render_markdown_path
|
||||
|
||||
return env
|
||||
|
||||
Reference in New Issue
Block a user