diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-06-16 20:48:55 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-06-16 21:18:24 -0700 |
commit | 9da5d8955ecc090d1582a9d007a0ecace654d229 (patch) | |
tree | 0b62c1e9c03311818bb272d14b0080af62ec1c3f | |
parent | 87c08be58f54ae60cfd57be6c17a256cbdb105d6 (diff) | |
download | pandoc-9da5d8955ecc090d1582a9d007a0ecace654d229.tar.gz |
Markdown reader: fixed #1333 (table parsing bug).
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index caa938ed6..c20a2a1fc 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1117,13 +1117,14 @@ multilineTable headless = multilineTableHeader :: Bool -- ^ Headerless table -> MarkdownParser (F [Blocks], [Alignment], [Int]) multilineTableHeader headless = try $ do - if headless - then return '\n' - else tableSep >>~ notFollowedBy blankline + unless headless $ + tableSep >> notFollowedBy blankline rawContent <- if headless then return $ repeat "" - else many1 - (notFollowedBy tableSep >> many1Till anyChar newline) + else many1 $ do + notFollowedBy blankline + notFollowedBy tableSep + anyLine initSp <- nonindentSpaces dashes <- many1 (dashedLine '-') newline |