From 1aff783095cad920a42e5c825e8e78896a2d0e17 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 2 Mar 2013 18:59:50 -0800 Subject: Markdown reader: Allow spaces around borders in pipe tables. Closes #772. --- src/Text/Pandoc/Readers/Markdown.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3