aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2013-01-27 22:13:05 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2013-01-27 22:13:05 -0800
commit72d11ad20bd5f291c373b1aeb09cc869905b0f26 (patch)
tree653510a5db888923bc8cd658e8bbd7088c681c73 /src
parent9d549ab683ba4d98a295dc156ea4b81f57f383a7 (diff)
downloadpandoc-72d11ad20bd5f291c373b1aeb09cc869905b0f26.tar.gz
Markdown/RST reader: Skip blank lines.
This fixes a subtle regression involving grid tables with empty cells. Closes #732. Also added test for grid table with empty cells.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
-rw-r--r--src/Text/Pandoc/Readers/RST.hs1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 44cbbc676..9113cb75e 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -373,6 +373,7 @@ block = choice [ codeBlockFenced
, abbrevKey
, para
, plain
+ , mempty <$ blanklines
] <?> "block"
--
@@ -807,7 +808,7 @@ para = try $ do
_ -> return $ B.para result'
plain :: MarkdownParser (F Blocks)
-plain = fmap B.plain . trimInlinesF . mconcat <$> many1 inline <* spaces
+plain = fmap B.plain . trimInlinesF . mconcat <$> many1 inline
--
-- raw html
diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs
index c5e2617da..378e49703 100644
--- a/src/Text/Pandoc/Readers/RST.hs
+++ b/src/Text/Pandoc/Readers/RST.hs
@@ -143,6 +143,7 @@ block = choice [ codeBlock
, list
, lhsCodeBlock
, para
+ , mempty <$ blanklines
] <?> "block"
--