diff options
author | Adam Wood <adam.michael.wood@gmail.com> | 2016-10-26 10:17:38 -0700 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2016-10-26 13:17:38 -0400 |
commit | 0244474b2dbf15986891a8d700c7bb121dc6f55f (patch) | |
tree | 426f87e0814a05bb3989b2d8c08c5216b2dda84f /markdown/extensions | |
parent | 251183ef2817dcf09f502bea15423f6e81c5e228 (diff) | |
download | python-markdown-0244474b2dbf15986891a8d700c7bb121dc6f55f.tar.gz |
lists are not tables - fixes #478 (#507)
Diffstat (limited to 'markdown/extensions')
-rw-r--r-- | markdown/extensions/tables.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py index 8c11739..7c75507 100644 --- a/markdown/extensions/tables.py +++ b/markdown/extensions/tables.py @@ -30,7 +30,8 @@ class TableProcessor(BlockProcessor): rows = block.split('\n') return (len(rows) > 1 and '|' in rows[0] and '|' in rows[1] and '-' in rows[1] and - rows[1].strip()[0] in ['|', ':', '-']) + rows[1].strip()[0] in ['|', ':', '-'] and + set(rows[1]) <= set('|:- ')) def run(self, parent, blocks): """ Parse a table block and build table. """ |