2efde2556f854b050b6fd522a922d75ed9f1b5f4
[fnpdjango.git] / fnpdjango / utils / text / textilepl.py
1 from textile import Textile
2
3
4 class TextilePL(Textile):
5     """Polish version of Textile.
6
7     Changes opening quote to Polish lower-double.
8     """
9     glyph_defaults = [(name, repl) 
10         for (name, repl) in Textile.glyph_defaults
11         if name != 'txt_quote_double_open']
12     glyph_defaults.append(('txt_quote_double_open', '„'))
13
14
15 def textile_pl(text):
16     return TextilePL().textile(text)
17
18
19 def textile_restricted_pl(text):
20     return TextilePL(restricted=True, lite=True,
21                    noimage=True, auto_link=False).textile(
22                         text, rel='nofollow')