mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-09-27 14:00:21 +00:00
14 lines
300 B
Python
14 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
|