aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-03-02 18:59:50 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-03-02 18:59:50 -0800
commit1aff783095cad920a42e5c825e8e78896a2d0e17 (patch)
tree62e3c9100f7d309f503b4bd14038afe4749d93d2 /src/Text
parentf449dfd55d5abb6613f1fd4eb8a0b705d3d463bb (diff)
downloadpandoc-1aff783095cad920a42e5c825e8e78896a2d0e17.tar.gz
Markdown reader: Allow spaces around borders in pipe tables.
Closes #772.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index c311ff158..02d3eacd2 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1184,10 +1184,12 @@ pipeTableRow = do
| otherwise -> B.plain $ ils') cells'
pipeTableHeaderPart :: Parser [Char] st Alignment
-pipeTableHeaderPart = do
+pipeTableHeaderPart = try $ do
+ skipMany spaceChar
left <- optionMaybe (char ':')
many1 (char '-')
right <- optionMaybe (char ':')
+ skipMany spaceChar
return $
case (left,right) of
(Nothing,Nothing) -> AlignDefault