mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-12 18:45:58 +00:00
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.
This commit is contained in:
@@ -948,6 +948,7 @@ htmlTag f = try $ do
|
||||
parseOptions{ optTagWarning = True } inp
|
||||
guard $ f next
|
||||
case next of
|
||||
TagWarning _ -> fail "encountered TagWarning"
|
||||
TagComment s
|
||||
| "<!--" `isPrefixOf` inp -> do
|
||||
count (length s + 4) anyChar
|
||||
|
||||
@@ -181,6 +181,9 @@ tests = [ testGroup "inline code"
|
||||
, "technically invalid comment" =:
|
||||
"<!-- pandoc --help -->" =?>
|
||||
rawBlock "html" "<!-- pandoc --help -->"
|
||||
, test markdownGH "issue 2469" $
|
||||
"<\n\na>" =?>
|
||||
para (text "<") <> para (text "a>")
|
||||
]
|
||||
, "unbalanced brackets" =:
|
||||
"[[[[[[[[[[[[[[[hi" =?> para (text "[[[[[[[[[[[[[[[hi")
|
||||
|
||||
Reference in New Issue
Block a user