fnp
/
fnpdjango.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix
[fnpdjango.git]
/
fnpdjango
/
utils
/
text
/
textilepl.py
diff --git
a/fnpdjango/utils/text/textilepl.py
b/fnpdjango/utils/text/textilepl.py
index
434816b
..
bbad72a
100644
(file)
--- a/
fnpdjango/utils/text/textilepl.py
+++ b/
fnpdjango/utils/text/textilepl.py
@@
-1,20
+1,23
@@
-from textile import Textile
+try:
+ from textile import Textile
+except ImportError:
+ pass
+else:
+ class TextilePL(Textile):
+ """Polish version of Textile.
-class TextilePL(Textile):
- """Polish version of Textile.
+ Changes opening quote to Polish lower-double.
+ """
+ glyph_definitions = dict(Textile.glyph_definitions,
+ quote_double_open = '„'
+ )
- Changes opening quote to Polish lower-double.
- """
- glyph_definitions = dict(Textile.glyph_definitions,
- quote_double_open = '„'
- )
+ def textile_pl(text):
+ return TextilePL().parse(text)
-def textile_pl(text):
- return TextilePL().parse(text)
-
-def textile_restricted_pl(text):
- return TextilePL(restricted=True, lite=True, noimage=True).parse(
- text, rel='nofollow')
+ def textile_restricted_pl(text):
+ return TextilePL(restricted=True, lite=True, noimage=True).parse(
+ text, rel='nofollow')