git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: Allow spaces around borders in pipe tables.

Closes #772.

commit1aff783095cad920a42e5c825e8e78896a2d0e17 authorJohn MacFarlane <fiddlosopher@gmail.com> dateSat 2 Mar 2013, 18:59 (14 years ago) parentf449dfd
1 file changed+3−1
src/Text/Pandoc/Readers/Markdown.hs+3−1
src/Text/Pandoc/Readers/Markdown.hs+3−1
@@ -1184,10 +1184,12 @@ pipeTableRow = do
11841184 | otherwise -> B.plain $ ils') cells'
11851185
11861186pipeTableHeaderPart :: Parser [Char] st Alignment
1187−pipeTableHeaderPart = do
1187+pipeTableHeaderPart = try $ do
1188+ skipMany spaceChar
11881189 left <- optionMaybe (char ':')
11891190 many1 (char '-')
11901191 right <- optionMaybe (char ':')
1192+ skipMany spaceChar
11911193 return $
11921194 case (left,right) of
11931195 (Nothing,Nothing) -> AlignDefault