forked from Python-Markdown/markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only strip spaces in tables (Python-Markdown#644)
Strip only the space character and not things like nbsp in tables. Fixes Python-Markdown#635.
- Loading branch information
1 parent
b0e993a
commit cab4b69
Showing
3 changed files
with
48 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'] | ||
) |