From 69cfbd975f97a58b72e47036e382a158dc4b48d3 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 27 Jul 2012 19:22:57 -0400 Subject: [PATCH] Fix args. --- mwparserfromhell/nodes/heading.py | 2 +- mwparserfromhell/nodes/html_entity.py | 2 +- mwparserfromhell/nodes/tag.py | 2 +- mwparserfromhell/nodes/text.py | 2 +- mwparserfromhell/wikicode.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/mwparserfromhell/nodes/heading.py b/mwparserfromhell/nodes/heading.py index 67851d5..1f26df6 100644 --- a/mwparserfromhell/nodes/heading.py +++ b/mwparserfromhell/nodes/heading.py @@ -32,7 +32,7 @@ class Heading(Node): def __unicode__(self): return ("=" * self.level) + self.title + ("=" * self.level) - def __strip__(self, normalize=True, collapse=True): + def __strip__(self, normalize, collapse): return self.title @property diff --git a/mwparserfromhell/nodes/html_entity.py b/mwparserfromhell/nodes/html_entity.py index aede31f..314b709 100644 --- a/mwparserfromhell/nodes/html_entity.py +++ b/mwparserfromhell/nodes/html_entity.py @@ -53,7 +53,7 @@ class HTMLEntity(Node): return u"&#x{0};".format(self.value) return u"&#{0};".format(self.value) - def __strip__(self, normalize=True, collapse=True): + def __strip__(self, normalize, collapse): if normalize: return self.normalize() return self diff --git a/mwparserfromhell/nodes/tag.py b/mwparserfromhell/nodes/tag.py index f0a7748..faaaa54 100644 --- a/mwparserfromhell/nodes/tag.py +++ b/mwparserfromhell/nodes/tag.py @@ -100,7 +100,7 @@ class Tag(Node): result += "" return result - def __strip__(self, normalize=True, collapse=True): + def __strip__(self, normalize, collapse): if self.type in self.TAGS_VISIBLE: return self.contents.strip_code(normalize, collapse) return None diff --git a/mwparserfromhell/nodes/text.py b/mwparserfromhell/nodes/text.py index d6b929c..bd0a108 100644 --- a/mwparserfromhell/nodes/text.py +++ b/mwparserfromhell/nodes/text.py @@ -31,7 +31,7 @@ class Text(Node): def __unicode__(self): return unicode(self.value) - def __strip__(self, normalize=True, collapse=True): + def __strip__(self, normalize, collapse): return self @property diff --git a/mwparserfromhell/wikicode.py b/mwparserfromhell/wikicode.py index ae05879..72195be 100644 --- a/mwparserfromhell/wikicode.py +++ b/mwparserfromhell/wikicode.py @@ -253,7 +253,7 @@ class Wikicode(StringMixIn): def strip_code(self, normalize=True, collapse=True): nodes = [] for node in self.nodes: - stripped = node.__strip__(normalize) + stripped = node.__strip__(normalize, collapse) if stripped: nodes.append(unicode(stripped))