diff options
author | Isaac Muse <faceless.shop@gmail.com> | 2018-02-22 06:46:35 -0700 |
---|---|---|
committer | Waylan Limberg <waylan.limberg@icloud.com> | 2018-02-22 08:46:35 -0500 |
commit | cab4b69e946ce82fcd5e97db962e1a706da05ff5 (patch) | |
tree | 3e6fc7234f568bcd3abed9cb10ddd11c0ca91f2c /tests | |
parent | b0e993a23ab96562d9e0e86fcba715c9d8b9ffcf (diff) | |
download | markdown-cab4b69e946ce82fcd5e97db962e1a706da05ff5.tar.gz markdown-cab4b69e946ce82fcd5e97db962e1a706da05ff5.tar.bz2 markdown-cab4b69e946ce82fcd5e97db962e1a706da05ff5.zip |
Only strip spaces in tables (#644)
Strip only the space character and not things like nbsp in tables. Fixes #635.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_syntax/extensions/__init__.py | 0 | ||||
-rw-r--r-- | tests/test_syntax/extensions/test_tables.py | 43 |
2 files changed, 43 insertions, 0 deletions
diff --git a/tests/test_syntax/extensions/__init__.py b/tests/test_syntax/extensions/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/tests/test_syntax/extensions/__init__.py 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( + """ + <table> + <thead> + <tr> + <th> </th> + <th>Second Header</th> + </tr> + </thead> + <tbody> + <tr> + <td> </td> + <td>Content Cell</td> + </tr> + <tr> + <td>Content Cell</td> + <td> </td> + </tr> + </tbody> + </table> + """ + ), + extensions=['tables'] + ) |