From: David G. <go...@us...> - 2004-07-22 01:06:46
|
Update of /cvsroot/ht2html/ht2html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8903 Modified Files: rst_html.py Log Message: Leave encoding of result up to client code. (Rev. 1.2 checkin message should have been """simplified glue code (for new Docutils API); needs Docutils 0.3.3+ (and Python 2.3 for non-Latin-1 output)""".) Index: rst_html.py =================================================================== RCS file: /cvsroot/ht2html/ht2html/rst_html.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rst_html.py 20 Jul 2004 23:16:44 -0000 1.2 --- rst_html.py 22 Jul 2004 01:06:38 -0000 1.3 *************** *** 8,13 **** ! def process_rst (filename, body): ! "Parse 'body' as RST and convert it to HTML" settings = { # `body` text already decoded (already Unicode): --- 8,16 ---- ! def process_rst(filename, body): ! """ ! Parse 'body' (Unicode string) as RST and convert it to HTML fragment. ! Returned HTML is also a Unicode string. ! """ settings = { # `body` text already decoded (already Unicode): *************** *** 27,30 **** # for Docutils config files: config_section='ht2html application') ! body = parts['fragment'] ! return body.encode('latin-1', 'xmlcharrefreplace') --- 30,32 ---- # for Docutils config files: config_section='ht2html application') ! return parts['fragment'] |