From 0244474b2dbf15986891a8d700c7bb121dc6f55f Mon Sep 17 00:00:00 2001 From: Adam Wood Date: Wed, 26 Oct 2016 10:17:38 -0700 Subject: lists are not tables - fixes #478 (#507) --- markdown/extensions/tables.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'markdown') 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. """ -- cgit v1.2.3