aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs3
-rw-r--r--src/Text/Pandoc/Readers/RST.hs1
-rw-r--r--tests/markdown-reader-more.native8
-rw-r--r--tests/markdown-reader-more.txt13
4 files changed, 20 insertions, 5 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"
--
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native
index 382aa056c..69b29992c 100644
--- a/tests/markdown-reader-more.native
+++ b/tests/markdown-reader-more.native
@@ -118,4 +118,10 @@
[[Plain [Str "b"]]
,[Plain [Str "b",Space,Str "2"]]
,[Plain [Str "b",Space,Str "2"]]]]
- ,[Para [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"]]]]]
+ ,[Para [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"]]]]
+,Para [Str "Empty",Space,Str "cells"]
+,Table [] [AlignDefault,AlignDefault] [5.555555555555555e-2,5.555555555555555e-2]
+ [[]
+ ,[]]
+ [[[]
+ ,[]]]]
diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt
index b76b6d985..e471100d2 100644
--- a/tests/markdown-reader-more.txt
+++ b/tests/markdown-reader-more.txt
@@ -196,8 +196,15 @@ Multiple blocks in a cell
+------------------+-----------+------------+
| # col 1 | # col 2 | # col 3 |
| col 1 | col 2 | col 3 |
-+------------------+-----------+------------+
++------------------+-----------+------------+
| r1 a | - b | c |
-| | - b 2 | c 2 |
-| r1 bis | - b 2 | c 2 |
+| | - b 2 | c 2 |
+| r1 bis | - b 2 | c 2 |
+------------------+-----------+------------+
+
+Empty cells
+
++---+---+
+| | |
++---+---+
+