summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-06-16 20:48:55 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2014-06-16 21:18:24 -0700
commit9da5d8955ecc090d1582a9d007a0ecace654d229 (patch)
tree0b62c1e9c03311818bb272d14b0080af62ec1c3f /src/Text/Pandoc/Readers
parent87c08be58f54ae60cfd57be6c17a256cbdb105d6 (diff)
Markdown reader: fixed #1333 (table parsing bug).
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs11
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