mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Fix for failing test in e0d56e
This commit is contained in:
@@ -9,6 +9,9 @@ register = template.Library()
|
||||
|
||||
@register.filter(name="markdown")
|
||||
def markdown_filter(text, format='html'):
|
||||
# markdown library can't handle text=None
|
||||
if text is None:
|
||||
return text
|
||||
html = markdown.markdown(text)
|
||||
if format == 'html':
|
||||
return mark_safe('<div class="markdown">' + html + '</div>')
|
||||
|
||||
Reference in New Issue
Block a user