aa15466bae9c32d17a43970c5275cfa51d1f4bdf
[fnpdjango.git] / fnpdjango / templatetags / fnp_markup.py
1 import textile
2 from django import template
3 from django.utils.safestring import mark_safe
4 from ..utils.text import textilepl
5
6 register = template.Library()
7
8 @register.filter
9 def textile_en(node):
10     return mark_safe(textile.textile(node))
11
12 @register.filter
13 def textile_restricted_en(node):
14     return mark_safe(textile.textile_restricted(node))
15
16 @register.filter
17 def textile_pl(node):
18     return mark_safe(textilepl.textile_pl(node))
19
20 @register.filter
21 def textile_restricted_pl(node):
22     return mark_safe(textilepl.textile_restricted_pl(node))