From cab4b69e946ce82fcd5e97db962e1a706da05ff5 Mon Sep 17 00:00:00 2001 From: Isaac Muse Date: Thu, 22 Feb 2018 06:46:35 -0700 Subject: Only strip spaces in tables (#644) Strip only the space character and not things like nbsp in tables. Fixes #635. --- tests/test_syntax/extensions/__init__.py | 0 tests/test_syntax/extensions/test_tables.py | 43 +++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+) create mode 100644 tests/test_syntax/extensions/__init__.py create mode 100644 tests/test_syntax/extensions/test_tables.py (limited to 'tests') diff --git a/tests/test_syntax/extensions/__init__.py b/tests/test_syntax/extensions/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_syntax/extensions/test_tables.py b/tests/test_syntax/extensions/test_tables.py new file mode 100644 index 0000000..1565324 --- /dev/null +++ b/tests/test_syntax/extensions/test_tables.py @@ -0,0 +1,43 @@ +# -*- coding: utf-8 -*- +from __future__ import unicode_literals +from markdown.test_tools import TestCase + + +class TestTableBlocks(TestCase): + + def test_empty_cells(self): + """Empty cells (nbsp).""" + + text = """ +  | Second Header +------------- | ------------- +  | Content Cell +Content Cell |   +""" + + self.assertMarkdownRenders( + text, + self.dedent( + """ + + + + + + + + + + + + + + + + + +
 Second Header
 Content Cell
Content Cell 
+ """ + ), + extensions=['tables'] + ) -- cgit v1.2.3