git.iko.soy/typeable/pandoc
on master help sign in
Fixed over-eager raw HTML inline parsing.
a7150bbJohn MacFarlane
src/Text/Pandoc/Readers/HTML.hs+1
@@ -948,6 +948,7 @@ htmlTag f = try $ do
948 parseOptions{ optTagWarning = True } inp
948 parseOptions{ optTagWarning = True } inp
949 guard $ f next
949 guard $ f next
950 case next of
950 case next of
951+ TagWarning _ -> fail "encountered TagWarning"
951 TagComment s
952 TagComment s
952 | "<!--" `isPrefixOf` inp -> do
953 | "<!--" `isPrefixOf` inp -> do
953 count (length s + 4) anyChar
954 count (length s + 4) anyChar
tests/Tests/Readers/Markdown.hs+3
@@ -181,6 +181,9 @@ tests = [ testGroup "inline code"
181 , "technically invalid comment" =:
181 , "technically invalid comment" =:
182 "<!-- pandoc --help -->" =?>
182 "<!-- pandoc --help -->" =?>
183 rawBlock "html" "<!-- pandoc --help -->"
183 rawBlock "html" "<!-- pandoc --help -->"
184+ , test markdownGH "issue 2469" $
185+ "<\n\na>" =?>
186+ para (text "<") <> para (text "a>")
184 ]
187 ]
185 , "unbalanced brackets" =:
188 , "unbalanced brackets" =:
186 "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi")
189 "[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi")