aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Readers/HTML.hs3
-rw-r--r--test/command/10643.md11
2 files changed, 14 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/HTML.hs b/src/Text/Pandoc/Readers/HTML.hs
index 36d622abb..23019e651 100644
--- a/src/Text/Pandoc/Readers/HTML.hs
+++ b/src/Text/Pandoc/Readers/HTML.hs
@@ -713,6 +713,7 @@ inline = pTagText <|> do
"input"
| lookup "type" attr == Just "checkbox"
-> asks inListItem >>= guard >> pCheckbox
+ "style" -> B.rawInline "html" <$> pHtmlBlock "style"
"script"
| Just x <- lookup "type" attr
, "math/tex" `T.isPrefixOf` x -> pScriptMath
@@ -1077,6 +1078,8 @@ isInlineTag :: Tag Text -> Bool
isInlineTag t = isCommentTag t || case t of
TagOpen "script" _ -> "math/tex" `T.isPrefixOf` fromAttrib "type" t
TagClose "script" -> True
+ TagOpen "style" _ -> True -- see #10643, invalid but it happens
+ TagClose "style" -> True
TagOpen name _ -> isInlineTagName name
TagClose name -> isInlineTagName name
_ -> False
diff --git a/test/command/10643.md b/test/command/10643.md
new file mode 100644
index 000000000..2cf41bf20
--- /dev/null
+++ b/test/command/10643.md
@@ -0,0 +1,11 @@
+```
+% pandoc -f html -t native
+<p>A<style></style>B</p>
+^D
+[ Para
+ [ Str "A"
+ , RawInline (Format "html") "<style></style>"
+ , Str "B"
+ ]
+]
+```