diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-03-02 18:59:50 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-03-02 18:59:50 -0800 |
commit | 1aff783095cad920a42e5c825e8e78896a2d0e17 (patch) | |
tree | 62e3c9100f7d309f503b4bd14038afe4749d93d2 /src/Text/Pandoc | |
parent | f449dfd55d5abb6613f1fd4eb8a0b705d3d463bb (diff) | |
download | pandoc-1aff783095cad920a42e5c825e8e78896a2d0e17.tar.gz |
Markdown reader: Allow spaces around borders in pipe tables.
Closes #772.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 4 |
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 |