@@ -32,7 +32,7 @@ class Heading(Node): | |||||
def __unicode__(self): | def __unicode__(self): | ||||
return ("=" * self.level) + self.title + ("=" * self.level) | return ("=" * self.level) + self.title + ("=" * self.level) | ||||
def __strip__(self, normalize=True, collapse=True): | |||||
def __strip__(self, normalize, collapse): | |||||
return self.title | return self.title | ||||
@property | @property | ||||
@@ -53,7 +53,7 @@ class HTMLEntity(Node): | |||||
return u"&#x{0};".format(self.value) | return u"&#x{0};".format(self.value) | ||||
return u"&#{0};".format(self.value) | return u"&#{0};".format(self.value) | ||||
def __strip__(self, normalize=True, collapse=True): | |||||
def __strip__(self, normalize, collapse): | |||||
if normalize: | if normalize: | ||||
return self.normalize() | return self.normalize() | ||||
return self | return self | ||||
@@ -100,7 +100,7 @@ class Tag(Node): | |||||
result += "</" + unicode(self.tag) + " " * self.close_padding + ">" | result += "</" + unicode(self.tag) + " " * self.close_padding + ">" | ||||
return result | return result | ||||
def __strip__(self, normalize=True, collapse=True): | |||||
def __strip__(self, normalize, collapse): | |||||
if self.type in self.TAGS_VISIBLE: | if self.type in self.TAGS_VISIBLE: | ||||
return self.contents.strip_code(normalize, collapse) | return self.contents.strip_code(normalize, collapse) | ||||
return None | return None | ||||
@@ -31,7 +31,7 @@ class Text(Node): | |||||
def __unicode__(self): | def __unicode__(self): | ||||
return unicode(self.value) | return unicode(self.value) | ||||
def __strip__(self, normalize=True, collapse=True): | |||||
def __strip__(self, normalize, collapse): | |||||
return self | return self | ||||
@property | @property | ||||
@@ -253,7 +253,7 @@ class Wikicode(StringMixIn): | |||||
def strip_code(self, normalize=True, collapse=True): | def strip_code(self, normalize=True, collapse=True): | ||||
nodes = [] | nodes = [] | ||||
for node in self.nodes: | for node in self.nodes: | ||||
stripped = node.__strip__(normalize) | |||||
stripped = node.__strip__(normalize, collapse) | |||||
if stripped: | if stripped: | ||||
nodes.append(unicode(stripped)) | nodes.append(unicode(stripped)) | ||||