CVS: ht2html rst_html.py,1.2,1.3

David Goodger <[email protected]> Wed, 21 Jul 2004 18:06:40 -0700
Newsgroups gmane.comp.web.ht2html.devel
Message-ID <[email protected]>
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']



-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click