aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions/tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'markdown/extensions/tables.py')
-rw-r--r--markdown/extensions/tables.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py
index cbf711a..368321d 100644
--- a/markdown/extensions/tables.py
+++ b/markdown/extensions/tables.py
@@ -27,7 +27,7 @@ class TableProcessor(BlockProcessor):
def test(self, parent, block):
rows = block.split('\n')
- return (len(rows) > 2 and '|' in rows[0] and
+ return (len(rows) > 1 and '|' in rows[0] and
'|' in rows[1] and '-' in rows[1] and
rows[1].strip()[0] in ['|', ':', '-'])
@@ -36,7 +36,7 @@ class TableProcessor(BlockProcessor):
block = blocks.pop(0).split('\n')
header = block[0].strip()
seperator = block[1].strip()
- rows = block[2:]
+ rows = [] if len(block) < 3 else block[2:]
# Get format type (bordered by pipes or not)
border = False
if header.startswith('|'):