@@ -196,7 +196,14 @@ htmlScript = try $ do
196 rest <- manyTill anyChar (htmlEndTag "script")
196 rest <- manyTill anyChar (htmlEndTag "script")
197 return $ open ++ rest ++ "</script>"
197 return $ open ++ rest ++ "</script>"
199+-- | Parses material between style tags.
200+-- Style tags must be treated differently, because they can contain CSS
202+ open <- string "<style"
203+ rest <- manyTill anyChar (htmlEndTag "style")
204+ return $ open ++ rest ++ "</style>"
199−htmlBlockElement = choice [ htmlScript, htmlComment, xmlDec, definition ]
206+htmlBlockElement = choice [ htmlScript, htmlStyle, htmlComment, xmlDec, definition ]
201rawHtmlBlock = try $ do
208rawHtmlBlock = try $ do
202 body <- htmlBlockElement <|> anyHtmlTag <|> anyHtmlEndTag
209 body <- htmlBlockElement <|> anyHtmlTag <|> anyHtmlEndTag
@@ -435,7 +442,7 @@ code = try $ do
435 joinWithSep " " $ lines result
442 joinWithSep " " $ lines result
437rawHtmlInline = do
444rawHtmlInline = do
438− result <- htmlScript <|> htmlComment <|> anyHtmlInlineTag
445+ result <- htmlScript <|> htmlStyle <|> htmlComment <|> anyHtmlInlineTag
439 state <- getState
446 state <- getState
440 if stateParseRaw state then return (HtmlInline result) else return (Str "")
447 if stateParseRaw state then return (HtmlInline result) else return (Str "")