changeset 627:b8e8697ea0af

Increased docutils compatiblity, thanks to Matt for the patch.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 07 May 2006 13:27:23 +0200
parents 50c7a0cc1791
children dcb874ba84ba 85db0f6b5bd6 4087ef824374
files MoinMoin/parser/rst.py docs/CHANGES
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/rst.py	Sun May 07 13:17:04 2006 +0200
+++ b/MoinMoin/parser/rst.py	Sun May 07 13:27:23 2006 +0200
@@ -165,6 +165,11 @@
                                  self)
         self.document.walkabout(visitor)
         self.visitor = visitor
+        # Docutils 0.5.0 and later require the writer to have the visitor 
+        # attributes.
+        if (hasattr(html4css1.Writer, 'visitor_attributes')):
+            for attr in html4css1.Writer.visitor_attributes:
+                setattr(self, attr, getattr(visitor, attr))
         self.output = html_escape_unicode(visitor.astext())
 
 class Parser:
@@ -189,6 +194,7 @@
                 'file_insertion_enabled': 0,
                 'raw_enabled': 0,
                 'stylesheet_path': '',
+                'template': '',
             }
         )
 
--- a/docs/CHANGES	Sun May 07 13:17:04 2006 +0200
+++ b/docs/CHANGES	Sun May 07 13:27:23 2006 +0200
@@ -39,6 +39,8 @@
       specific terms
     * Fix the forgotten password email login URL and also properly encode the
       email body. Thanks to Robin Dunn for the patch.
+    * Applied a patch by Matthew Gilbert for increased compatiblity with
+      latest docutils.
 
 
 Version 1.5.3: