[Python-checkins] r64629 - in doctools/trunk: sphinx/textwriter.py

georg.brandl python-checkins at python.org
Tue Jul 1 22:13:15 CEST 2008


Author: georg.brandl
Date: Tue Jul  1 22:13:15 2008
New Revision: 64629

Log:
Merged revisions 64628 via svnmerge from 
svn+ssh://pythondev@svn.python.org/doctools/branches/0.4.x

........
  r64628 | georg.brandl | 2008-07-01 22:11:27 +0200 (Tue, 01 Jul 2008) | 2 lines
  
  Add sub-/superscript node handling to TextBuilder. #3217.
........


Modified:
   doctools/trunk/   (props changed)
   doctools/trunk/sphinx/textwriter.py

Modified: doctools/trunk/sphinx/textwriter.py
==============================================================================
--- doctools/trunk/sphinx/textwriter.py	(original)
+++ doctools/trunk/sphinx/textwriter.py	Tue Jul  1 22:13:15 2008
@@ -571,6 +571,16 @@
     def depart_literal(self, node):
         self.add_text('``')
 
+    def visit_subscript(self, node):
+        self.add_text('_')
+    def depart_subscript(self, node):
+        pass
+
+    def visit_superscript(self, node):
+        self.add_text('^')
+    def depart_superscript(self, node):
+        pass
+
     def visit_footnote_reference(self, node):
         self.add_text('[%s]' % node.astext())
         raise nodes.SkipNode


More information about the Python-checkins mailing list