aboutsummaryrefslogtreecommitdiffstats
path: root/markdown/extensions
diff options
context:
space:
mode:
authoreph <painy.eph@gmail.com>2016-08-15 22:33:55 +0800
committerWaylan Limberg <waylan.limberg@icloud.com>2016-08-15 10:33:55 -0400
commit5f358c0d580bd409279cef1404e6460e7fe2156e (patch)
tree95f65ce35781d46eb84392119a7494fd646b516a /markdown/extensions
parent655d1afbeec91ed0cbc57f36219dd1c7808ff47e (diff)
downloadmarkdown-5f358c0d580bd409279cef1404e6460e7fe2156e.tar.gz
markdown-5f358c0d580bd409279cef1404e6460e7fe2156e.tar.bz2
markdown-5f358c0d580bd409279cef1404e6460e7fe2156e.zip
Fix table alignment when seperator contains spaces (#489)
* Fix table alignment when seperator contains spaces eg. seperator like "------ | :----- | :----: | -----: | ------" * Update tests for table * Delete the newline at the end of tables.html
Diffstat (limited to 'markdown/extensions')
-rw-r--r--markdown/extensions/tables.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/markdown/extensions/tables.py b/markdown/extensions/tables.py
index a19018e..8c11739 100644
--- a/markdown/extensions/tables.py
+++ b/markdown/extensions/tables.py
@@ -45,6 +45,7 @@ class TableProcessor(BlockProcessor):
# Get alignment of columns
align = []
for c in self._split_row(seperator, border):
+ c = c.strip()
if c.startswith(':') and c.endswith(':'):
align.append('center')
elif c.startswith(':'):