git.iko.soy/typeable/pandoc
on master help sign in
Markdown reader: fixed #1333 (table parsing bug).
9da5d89John MacFarlane
src/Text/Pandoc/Readers/Markdown.hs+6−5
@@ -1117,13 +1117,14 @@ multilineTable headless =
1117multilineTableHeader :: Bool -- ^ Headerless table
1117multilineTableHeader :: Bool -- ^ Headerless table
1118 -> MarkdownParser (F [Blocks], [Alignment], [Int])
1118 -> MarkdownParser (F [Blocks], [Alignment], [Int])
1119multilineTableHeader headless = try $ do
1119multilineTableHeader headless = try $ do
1120− if headless
1120+ unless headless $
1121− then return '\n'
1122− else tableSep >>~ notFollowedBy blankline
1121+ tableSep >> notFollowedBy blankline
1123 rawContent <- if headless
1122 rawContent <- if headless
1124 then return $ repeat ""
1123 then return $ repeat ""
1125− else many1
1124+ else many1 $ do
1125+ notFollowedBy blankline
1126− (notFollowedBy tableSep >> many1Till anyChar newline)
1126+ notFollowedBy tableSep
1127+ anyLine
1127 initSp <- nonindentSpaces
1128 initSp <- nonindentSpaces
1128 dashes <- many1 (dashedLine '-')
1129 dashes <- many1 (dashedLine '-')
1129 newline
1130 newline