Skip to content
Myr

[svn] fixed unicode issues with dump textile library. this fixes #249.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 6aa1add · Browse files · 1 file+5 added−8 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+5 added−8 removed

  • other:+5 added−8 removed

1 file+5 added−8 removed

modified:jinja/filters.py+5 added-8 removed
536 unmodified lines
537538 .. _PyTextile: http://dealmeida.net/projects/textile/539 """540 from textile import textile541 return textile(s)541 return textile(s.encode('utf-8')).decode('utf-8')542do_textile = stringfilter(do_textile)543544545def do_markdown(s):
4 unmodified lines
550551 .. _Python-markdown: http://www.freewisdom.org/projects/python-markdown/552 """553 from markdown import markdown554 return markdown(s)554 return markdown(s.encode('utf-8')).decode('utf-8')555do_markdown = stringfilter(do_markdown)556557558def do_rst(s):
4 unmodified lines
563 requires `docutils`_.564565 .. _docutils: from http://docutils.sourceforge.net/566 """567 try:568 from docutils.core import publish_parts569 parts = publish_parts(source=s, writer_name='html4css1')570 return parts['fragment']567 from docutils.core import publish_parts568 parts = publish_parts(source=s, writer_name='html4css1')569 return parts['fragment']571 except:572 return s570do_rst = stringfilter(do_rst)571572573def do_int(default=0):
326 unmodified lines