git.iko.soy/typeable/pandoc
on master help sign in
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.

commita7150bb6b625dec9fd641dc770ab61a32e9d4e2c authorJohn MacFarlane <jgm@berkeley.edu> dateThu 22 Oct 2015, 21:18 (11 years ago) parenta21833b
2 files changed+4
src/Text/Pandoc/Readers/HTML.hs+1 tests/Tests/Readers/Markdown.hs+3
src/Text/Pandoc/Readers/HTML.hs+1
@@ -948,6 +948,7 @@ htmlTag f = try $ do
948948 parseOptions{ optTagWarning = True } inp
949949 guard $ f next
950950 case next of
951+ TagWarning _ -> fail "encountered TagWarning"
951952 TagComment s
952953 | "<!--" `isPrefixOf` inp -> do
953954 count (length s + 4) anyChar
tests/Tests/Readers/Markdown.hs+3
@@ -181,6 +181,9 @@ tests = [ testGroup "inline code"
181181 , "technically invalid comment" =:
182182 "<!-- pandoc --help -->" =?>
183183 rawBlock "html" "<!-- pandoc --help -->"
184+ , test markdownGH "issue 2469" $
185+ "<\n\na>" =?>
186+ para (text "<") <> para (text "a>")
184187 ]
185188 , "unbalanced brackets" =:
186189 "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi")