git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: fixed #1333 (table parsing bug).
commit9da5d8955ecc090d1582a9d007a0ecace654d229 authorJohn MacFarlane <jgm@berkeley.edu> dateMon 16 Jun 2014, 20:48 (12 years ago) parent87c08be
1 file changed+6−5
src/Text/Pandoc/Readers/Markdown.hs+6−5
src/Text/Pandoc/Readers/Markdown.hs+6−5
@@ -1117,13 +1117,14 @@ multilineTable headless =
11171117multilineTableHeader :: Bool -- ^ Headerless table
11181118 -> MarkdownParser (F [Blocks], [Alignment], [Int])
11191119multilineTableHeader headless = try $ do
1120− if headless
1121− then return '\n'
1122− else tableSep >>~ notFollowedBy blankline
1120+ unless headless $
1121+ tableSep >> notFollowedBy blankline
11231122 rawContent <- if headless
11241123 then return $ repeat ""
1125− else many1
1126− (notFollowedBy tableSep >> many1Till anyChar newline)
1124+ else many1 $ do
1125+ notFollowedBy blankline
1126+ notFollowedBy tableSep
1127+ anyLine
11271128 initSp <- nonindentSpaces
11281129 dashes <- many1 (dashedLine '-')
11291130 newline