From a7150bb6b625dec9fd641dc770ab61a32e9d4e2c Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 22 Oct 2015 21:18:06 -0700 Subject: Fixed over-eager raw HTML inline parsing. Tightened up the inline HTML parser so it disallows TagWarnings. This only affects the markdown reader when the `markdown_in_html_blocks` option is disabled. Closes #2469. --- src/Text/Pandoc/Readers/HTML.hs | 1 + tests/Tests/Readers/Markdown.hs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs index 8b66d2d3d..a97285ae2 100644 --- a/src/Text/Pandoc/Readers/HTML.hs +++ b/src/Text/Pandoc/Readers/HTML.hs @@ -948,6 +948,7 @@ htmlTag f = try $ do parseOptions{ optTagWarning = True } inp guard $ f next case next of + TagWarning _ -> fail "encountered TagWarning" TagComment s | "" =?> rawBlock "html" "" + , test markdownGH "issue 2469" $ + "<\n\na>" =?> + para (text "<") <> para (text "a>") ] , "unbalanced brackets" =: "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi") -- cgit v1.2.3