Fix for failing test in e0d56e

This commit is contained in:
Tom Price
2016-03-31 00:09:59 +01:00
parent e0d56e2a6e
commit 22b5111365

View File

@@ -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>')