moviewyrm/bookwyrm/templatetags/markdown.py
2021-05-11 15:14:42 -07:00

15 lines
300 B
Python

""" template filters """
from django import template
from bookwyrm.views.status import to_markdown
register = template.Library()
@register.filter(name="to_markdown")
def get_markdown(content):
"""convert markdown to html"""
if content:
return to_markdown(content)
return None