aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_syntax/extensions/test_tables.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_syntax/extensions/test_tables.py')
-rw-r--r--tests/test_syntax/extensions/test_tables.py43
1 files changed, 43 insertions, 0 deletions
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']
+ )