aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
-rw-r--r--tests/markdown-reader-more.native5
-rw-r--r--tests/markdown-reader-more.txt6
3 files changed, 11 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 896f5832e..18a8eda07 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -612,7 +612,7 @@ para = try $ do
return $ Para $ normalizeSpaces result
plain :: GenParser Char ParserState Block
-plain = many1 inline >>= return . Plain . normalizeSpaces
+plain = many1 inline >>~ spaces >>= return . Plain . normalizeSpaces
--
-- raw html
diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native
index c3c745510..3160f0cd3 100644
--- a/tests/markdown-reader-more.native
+++ b/tests/markdown-reader-more.native
@@ -10,5 +10,8 @@ Pandoc (Meta [] [] "")
, Para [Link [Str "baz"] ("/foo%20foo",""),Space,Link [Str "bam"] ("/foo%20fee",""),Space,Link [Str "bork"] ("/foo/zee%20zob","title")]
, Header 2 [Str "Horizontal",Space,Str "rules",Space,Str "with",Space,Str "spaces",Space,Str "at",Space,Str "end"]
, HorizontalRule
-, HorizontalRule ]
+, HorizontalRule
+, Header 2 [Str "Raw",Space,Str "HTML",Space,Str "before",Space,Str "header"]
+, Plain [HtmlInline "<a>",HtmlInline "</a>"]
+, Header 3 [Str "my",Space,Str "header"] ]
diff --git a/tests/markdown-reader-more.txt b/tests/markdown-reader-more.txt
index ccc9d3a0a..d2315046f 100644
--- a/tests/markdown-reader-more.txt
+++ b/tests/markdown-reader-more.txt
@@ -41,3 +41,9 @@
-- - -- -- -
+## Raw HTML before header
+
+<a></a>
+
+### my header
+