Browse Source

Fix args.

tags/v0.1
Ben Kurtovic 11 years ago
parent
commit
69cfbd975f
5 changed files with 5 additions and 5 deletions
  1. +1
    -1
      mwparserfromhell/nodes/heading.py
  2. +1
    -1
      mwparserfromhell/nodes/html_entity.py
  3. +1
    -1
      mwparserfromhell/nodes/tag.py
  4. +1
    -1
      mwparserfromhell/nodes/text.py
  5. +1
    -1
      mwparserfromhell/wikicode.py

+ 1
- 1
mwparserfromhell/nodes/heading.py View File

@@ -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


+ 1
- 1
mwparserfromhell/nodes/html_entity.py View File

@@ -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


+ 1
- 1
mwparserfromhell/nodes/tag.py View File

@@ -100,7 +100,7 @@ class Tag(Node):
result += "</" + unicode(self.tag) + " " * self.close_padding + ">"
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


+ 1
- 1
mwparserfromhell/nodes/text.py View File

@@ -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


+ 1
- 1
mwparserfromhell/wikicode.py View File

@@ -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))



Loading…
Cancel
Save