Skip to content

Commit 765c676

Browse files
committed
Declare a template method
1 parent cce3e31 commit 765c676

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/django_mermaid/templatetags/__init__.py

Whitespace-only changes.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import markdown
2+
from django import template
3+
from django.utils.safestring import mark_safe
4+
5+
register = template.Library()
6+
7+
8+
@register.filter
9+
@mark_safe
10+
def mermaid(text=""):
11+
return markdown.markdown(text)

0 commit comments

Comments
 (0)