fixrst.diff

? build
? fixrst.diff
? PyDS/ConfigLoader.pyc
? PyDS/Daemonize.pyc
? PyDS/DefaultConfig.pyc
? PyDS/Server.pyc
? PyDS/timeoutsocket.pyc
? PyDS/Translation.pyc
? PyDS/__init__.pyc
Index: PyDS/StructuredText.py
===================================================================
RCS file: /pyds/PyDS/PyDS/StructuredText.py,v
retrieving revision 1.8
diff -c -r1.8 StructuredText.py
*** PyDS/StructuredText.py	10 Apr 2003 11:57:41 -0000	1.8
--- PyDS/StructuredText.py	16 Apr 2003 03:39:27 -0000
***************
*** 30,35 ****
--- 30,36 ----
  import docutils.nodes
  import docutils.parsers.rst
  import docutils.utils
+ import docutils.frontend 
  
  try:
  	from cStringIO import StringIO
***************
*** 37,43 ****
  	from StringIO import StringIO
  
  # a bad hack to preserver my installed translation handler, as docutils has it's own
! _PyDS.translation.install()
  
  class TextBlock:
  
--- 38,51 ----
  	from StringIO import StringIO
  
  # a bad hack to preserver my installed translation handler, as docutils has it's own
! try:
!     _PyDS.translation.install()
! except NameError, e: 
!     if e.args[0] != "name '_PyDS' is not defined":
!         raise
!     else:
!         import warnings
!         warnings.warn("_PyDS translation hook not installed.")
  
  class TextBlock:
  
***************
*** 442,448 ****
  # This function renders a reStructuredText to HTML fragments
  def renderText(str):
  	parser = docutils.parsers.rst.Parser()
! 	document = docutils.utils.new_document()
  	parser.parse(str, document)
  	targetvisitor = TargetVisitor(document)
  	document.walk(targetvisitor)
--- 450,460 ----
  # This function renders a reStructuredText to HTML fragments
  def renderText(str):
  	parser = docutils.parsers.rst.Parser()
! 	op = docutils.frontend.OptionParser(
!         components=(docutils.parsers.rst.Parser,))
! 	settings = op.get_default_values()
! 	document = docutils.utils.new_document('PyDS.StructuredText.renderText',
!                                            settings)
  	parser.parse(str, document)
  	targetvisitor = TargetVisitor(document)
  	document.walk(targetvisitor)

last change 2003-04-16 13:40:48

April 2003
MoTuWeThFrSaSu
  1 2 3 4 5 6
7 8 910111213
14151617181920
21222324252627
282930    
Mar
2003
 May
2003

Fix for reStructuredText support, as a context diff from the current (2003/04/16 13:40 AEST) CVS version of PyDS.

XML-Image Letterimage

© 2003-2004, Garth T Kidd