[Python-checkins] r65547 - in doctools/branches/0.4.x: CHANGES sphinx/htmlwriter.py

georg.brandl python-checkins at python.org
Tue Aug 5 12:07:51 CEST 2008


Author: georg.brandl
Date: Tue Aug  5 12:07:50 2008
New Revision: 65547

Log:
Fix an indentation problem in production lists. #3477.


Modified:
   doctools/branches/0.4.x/CHANGES
   doctools/branches/0.4.x/sphinx/htmlwriter.py

Modified: doctools/branches/0.4.x/CHANGES
==============================================================================
--- doctools/branches/0.4.x/CHANGES	(original)
+++ doctools/branches/0.4.x/CHANGES	Tue Aug  5 12:07:50 2008
@@ -1,6 +1,8 @@
 Release 0.4.3 (in development)
 ==============================
 
+* Fix an indentation problem in production lists.
+
 * Fix encoding handling for literal include files: ``literalinclude``
   now has an ``encoding`` option that defaults to UTF-8.
 

Modified: doctools/branches/0.4.x/sphinx/htmlwriter.py
==============================================================================
--- doctools/branches/0.4.x/sphinx/htmlwriter.py	(original)
+++ doctools/branches/0.4.x/sphinx/htmlwriter.py	Tue Aug  5 12:07:50 2008
@@ -221,10 +221,9 @@
         maxlen = max(len(name) for name in names)
         for production in node:
             if production['tokenname']:
+                lastname = production['tokenname'].ljust(maxlen)
                 self.body.append(self.starttag(production, 'strong', ''))
-                self.body.append(production['tokenname'].ljust(maxlen) +
-                                 '</strong> ::= ')
-                lastname = production['tokenname']
+                self.body.append(lastname + '</strong> ::= ')
             else:
                 self.body.append('%s     ' % (' '*len(lastname)))
             production.walkabout(self)


More information about the Python-checkins mailing list