Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmwlib/expander.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/mwlib/expander.py b/mwlib/expander.py
index e5e4049..867af19 100755
--- a/mwlib/expander.py
+++ b/mwlib/expander.py
@@ -206,6 +206,11 @@ class Parser(object):
# find the name
name = Node()
t.children.append(name)
+
+ # empty blocks are a fact of life
+ if len(children) == 0:
+ return t
+
for idx, c in enumerate(children):
if c==u'|':
break
@@ -430,6 +435,9 @@ class Expander(object):
if name.startswith("[["):
return None
+ if name == '':
+ return ''
+
if name.startswith(":"):
log.info("including article")
raw = self.db.getRawArticle(name[1:])