changeset 5820:ff39884957af

parsers: avoid crash when Parser.format() call gets inhibit_p kw arg
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 19 Jan 2012 16:21:14 +0100
parents e55c5df76cee
children 99e2309a7ec0
files MoinMoin/parser/_ParserBase.py MoinMoin/parser/highlight.py MoinMoin/parser/text.py MoinMoin/parser/text_creole.py MoinMoin/parser/text_csv.py MoinMoin/parser/text_docbook.py MoinMoin/parser/text_html.py MoinMoin/parser/text_moin_wiki.py MoinMoin/parser/text_rst.py MoinMoin/parser/text_xslt.py
diffstat 10 files changed, 11 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/_ParserBase.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/_ParserBase.py	Thu Jan 19 16:21:14 2012 +0100
@@ -196,7 +196,7 @@
             fmt = FormatText(name)
         self.rule_fmt[name] = fmt
 
-    def format(self, formatter, form=None):
+    def format(self, formatter, form=None, **kw):
         """ Send the text.
         """
 
--- a/MoinMoin/parser/highlight.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/highlight.py	Thu Jan 19 16:21:14 2012 +0100
@@ -152,7 +152,7 @@
             params = format_args
         self.show_nums, self.num_start, self.num_step, attrs = parse_start_step(request, params)
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         _ = self.request.getText
         fmt = PygmentsFormatter(formatter, start_line=self.start_line)
 
--- a/MoinMoin/parser/text.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text.py	Thu Jan 19 16:21:14 2012 +0100
@@ -29,7 +29,7 @@
         self._ = request.getText
         self.start_line = kw.get('start_line', 0)
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         """ Send the text. """
 
         self.lines = self.raw.expandtabs().split('\n')
--- a/MoinMoin/parser/text_creole.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_creole.py	Thu Jan 19 16:21:14 2012 +0100
@@ -64,7 +64,7 @@
         self.rules = MoinRules(wiki_words=True,
                                url_protocols=config.url_schemas)
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         """Create and call the true parser and emitter."""
 
         document = CreoleParser(self.raw, self.rules).parse()
--- a/MoinMoin/parser/text_csv.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_csv.py	Thu Jan 19 16:21:14 2012 +0100
@@ -182,7 +182,7 @@
             data.addRow(tuple(row))
         self.data = data
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         browser = DataBrowserWidget(self.request, show_header=self._show_header)
         browser.setData(self.data)
         self.request.write(browser.render(method="GET"))
--- a/MoinMoin/parser/text_docbook.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_docbook.py	Thu Jan 19 16:21:14 2012 +0100
@@ -59,7 +59,7 @@
         self.wikiParser = WikiParser(raw=self.raw, request=self.request, pretty_url=1)
         self.key = 'docbook'
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         self.wikiParser.formatter = formatter
         XsltParser.format(self, formatter)
 
--- a/MoinMoin/parser/text_html.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_html.py	Thu Jan 19 16:21:14 2012 +0100
@@ -23,7 +23,7 @@
         self.raw = raw
         self.request = request
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         """ Send the text. """
         try:
             self.request.write(formatter.rawHTML(Markup(self.raw).sanitize()))
--- a/MoinMoin/parser/text_moin_wiki.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_moin_wiki.py	Thu Jan 19 16:21:14 2012 +0100
@@ -1425,7 +1425,7 @@
         else:
             return ''
 
-    def format(self, formatter, inhibit_p=False):
+    def format(self, formatter, inhibit_p=False, **kw):
         """ For each line, scan through looking for magic
             strings, outputting verbatim any intervening text.
         """
--- a/MoinMoin/parser/text_rst.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_rst.py	Thu Jan 19 16:21:14 2012 +0100
@@ -63,7 +63,7 @@
             self.raw = raw
             self.request = request
 
-        def format(self, formatter):
+        def format(self, formatter, **kw):
             _ = self.request.getText
             from MoinMoin.parser.text import Parser as TextParser
             self.request.write(formatter.sysmsg(1) +
@@ -200,7 +200,7 @@
         self.request = request
         self.form = request.form
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         # Create our simple parser
         parser = MoinDirectives(self.request)
 
--- a/MoinMoin/parser/text_xslt.py	Sat Jan 14 20:01:29 2012 +0100
+++ b/MoinMoin/parser/text_xslt.py	Thu Jan 19 16:21:14 2012 +0100
@@ -36,7 +36,7 @@
         self.base_uri = 'wiki://Self/'
         self.key = 'xslt'
 
-    def format(self, formatter):
+    def format(self, formatter, **kw):
         """ Send the text. """
         _ = self._