From 6802d287cf8a5ad5423521520b5d16287e991536 Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Sun, 23 Dec 2007 03:46:12 +0000 Subject: Modified rawHtmlBlock in HTML reader so it parses and tags. This allows these tags to be handled correctly in Markdown. HTML reader now uses rawHtmlBlock', which excludes and , since these are handled in parseHtml. (Resolves Issue #38.) git-svn-id: https://pandoc.googlecode.com/svn/trunk@1152 788f1e2b-df1e-0410-8736-df70ead52e1b --- Text/Pandoc/Readers/HTML.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Text/Pandoc/Readers/HTML.hs b/Text/Pandoc/Readers/HTML.hs index 70a071152..d379b373c 100644 --- a/Text/Pandoc/Readers/HTML.hs +++ b/Text/Pandoc/Readers/HTML.hs @@ -199,12 +199,16 @@ htmlScript = try $ do htmlBlockElement = choice [ htmlScript, htmlComment, xmlDec, definition ] rawHtmlBlock = try $ do - notFollowedBy' (htmlTag "/body" <|> htmlTag "/html") body <- htmlBlockElement <|> anyHtmlTag <|> anyHtmlEndTag sp <- many space state <- getState if stateParseRaw state then return (RawHtml (body ++ sp)) else return Null +-- We don't want to parse or as raw HTML, since these +-- are handled in parseHtml. +rawHtmlBlock' = do notFollowedBy' (htmlTag "/body" <|> htmlTag "/html") + rawHtmlBlock + -- | Parses an HTML comment. htmlComment = try $ do string "