[Python-checkins] r64628 - in doctools/branches/0.4.x: CHANGES sphinx/textwriter.py
georg.brandl
python-checkins at python.org
Tue Jul 1 22:11:27 CEST 2008
Author: georg.brandl
Date: Tue Jul 1 22:11:27 2008
New Revision: 64628
Log:
Add sub-/superscript node handling to TextBuilder. #3217.
Modified:
doctools/branches/0.4.x/CHANGES
doctools/branches/0.4.x/sphinx/textwriter.py
Modified: doctools/branches/0.4.x/CHANGES
==============================================================================
--- doctools/branches/0.4.x/CHANGES (original)
+++ doctools/branches/0.4.x/CHANGES Tue Jul 1 22:11:27 2008
@@ -1,3 +1,9 @@
+Release 0.4.1 (in development)
+==============================
+
+* Added sub-/superscript node handling to TextBuilder.
+
+
Release 0.4 (Jun 23, 2008)
==========================
Modified: doctools/branches/0.4.x/sphinx/textwriter.py
==============================================================================
--- doctools/branches/0.4.x/sphinx/textwriter.py (original)
+++ doctools/branches/0.4.x/sphinx/textwriter.py Tue Jul 1 22:11:27 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