[Blends-commit] r2601 - /blends/trunk/webtools/blendsmarkdown.py

tille at users.alioth.debian.org tille at users.alioth.debian.org
Mon Jan 17 20:33:45 UTC 2011


Author: tille
Date: Mon Jan 17 20:33:45 2011
New Revision: 2601

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=2601
Log:
Do the unicode conversion on a single place

Modified:
    blends/trunk/webtools/blendsmarkdown.py

Modified: blends/trunk/webtools/blendsmarkdown.py
URL: http://svn.debian.org/wsvn/blends/blends/trunk/webtools/blendsmarkdown.py?rev=2601&op=diff
==============================================================================
--- blends/trunk/webtools/blendsmarkdown.py (original)
+++ blends/trunk/webtools/blendsmarkdown.py Mon Jan 17 20:33:45 2011
@@ -11,6 +11,8 @@
 from markdown import markdown            # Markdown
 from docutils.core import publish_parts  # alternatively reST
 from genshi import Markup
+
+from blendsunicode import to_unicode
 
 detect_list_start_re = re.compile("^\s+[-*+]\s+")
 detect_code_start_re = re.compile("^\s")
@@ -64,12 +66,12 @@
     return ret
 
 def render_longdesc(lines):
-    MarkDownInput  = PrepareMarkdownInput(lines)
+    MarkDownInput  = to_unicode(PrepareMarkdownInput(lines))
 
     global rendering_lib
     if rendering_lib == 'rest':
         try:
-            LongDesc = publish_parts(unicode(MarkDownInput, 'utf-8'), writer_name='html')['body']
+            LongDesc = publish_parts(MarkDownInput, writer_name='html')['body']
         except:
             print >>stderr, "Unable to render the following prepared text:\n" + MarkDownInput
             LongDesc = "Problems in rendering description using reST"




More information about the Blends-commit mailing list