Commits

georg.brandl  committed a5e1d71

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.
........

  • Participants
  • Parent commits 48d2f2d

Comments (0)

Files changed (1)

File sphinx/textwriter.py

     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