Permalink
Browse files

Fix #91: hanging whitespace breaks tables

  • Loading branch information...
1 parent b380583 commit 3361ebcd22089fe64860f96a7b6acaf18a55746e @vmg vmg committed Feb 20, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 src/markdown.c
View
@@ -1970,10 +1970,13 @@ parse_table_header(
header_end = i;
+ while (header_end > 0 && _isspace(data[header_end - 1]))
+ header_end--;
+
if (data[0] == '|')
pipes--;
- if (i > 2 && data[i - 1] == '|')
+ if (header_end && data[header_end - 1] == '|')
pipes--;
*columns = pipes + 1;

0 comments on commit 3361ebc

Please sign in to comment.