aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 995c9c65a..4f13740eb 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -729,9 +729,11 @@ htmlElement :: Parser [Char] ParserState String
htmlElement = strictHtmlBlock <|> liftM snd (htmlTag isBlockTag)
htmlBlock :: Parser [Char] ParserState (F Blocks)
-htmlBlock = return . B.rawBlock "html" <$>
- ((guardEnabled Ext_markdown_in_html_blocks >> rawHtmlBlocks)
- <|> htmlBlock')
+htmlBlock = do
+ guardEnabled Ext_raw_html
+ res <- (guardEnabled Ext_markdown_in_html_blocks >> rawHtmlBlocks)
+ <|> htmlBlock'
+ return $ return $ B.rawBlock "html" res
htmlBlock' :: Parser [Char] ParserState String
htmlBlock' = try $ do
@@ -1507,6 +1509,7 @@ inBrackets parser = do
rawHtmlInline :: Parser [Char] ParserState (F Inlines)
rawHtmlInline = do
+ guardEnabled Ext_raw_html
mdInHtml <- option False $
guardEnabled Ext_markdown_in_html_blocks >> return True
(_,result) <- if mdInHtml