changeset 264:67e1f1d49a97

Fixed XML formatters. imported from: moin--main--1.5--patch-267
author Alexander Schremmer <alex@alexanderweb.de.tla>
date Thu, 01 Dec 2005 23:32:09 +0000
parents a6a3a9f539ae
children 2cbc7dc436d7
files MoinMoin/formatter/text_xml.py MoinMoin/formatter/xml_docbook.py
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_xml.py	Thu Dec 01 23:16:20 2005 +0000
+++ b/MoinMoin/formatter/text_xml.py	Thu Dec 01 23:32:09 2005 +0000
@@ -114,7 +114,7 @@
     def listitem(self, on, **kw):
         return ['<li>', '</li>\n'][not on]
 
-    def code(self, on):
+    def code(self, on, **kw):
         return ['<code>', '</code>'][not on]
 
     def sup(self, on):
@@ -200,7 +200,7 @@
                 attrs[key] = value
         return apply(FormatterBase.image, (self,), attrs) + '</img>'
 
-    def code_area(self, on, code_id, **kwargs):
+    def code_area(self, on, code_id, code_type='code', show=0, start=-1, step=-1):
         return ('<codearea id="%s">' % code_id, '</codearea')[not on]
 
     def code_line(self, on):
@@ -209,9 +209,6 @@
     def code_token(self, on, tok_type):
         return ('<codetoken type="%s">' % tok_type, '</codetoken')[not on]
 
-    def code_area(self, on, code_id, **kwargs):
-        return ('<codearea id="%s">' % code_id, '</codearea')[not on]
-
     def code_line(self, on):
         return ('<codeline>', '</codeline')[not on]
 
--- a/MoinMoin/formatter/xml_docbook.py	Thu Dec 01 23:16:20 2005 +0000
+++ b/MoinMoin/formatter/xml_docbook.py	Thu Dec 01 23:32:09 2005 +0000
@@ -288,10 +288,12 @@
         return self._handleFormatting("subscript", on)
 
     def strike(self, on):
+        # does not yield <strike> using the HTML XSLT files here ...
+        # but seems to be correct
         return self._handleFormatting("emphasis", on,
                                       (('role','strikethrough'), ))
 
-    def code(self, on):
+    def code(self, on, **kwargs):
         return self._handleFormatting("code", on)
 
     def preformatted(self, on):