From a243afb55104b0e5e1ddf62f301477a545381634 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 20 Jul 2014 17:22:29 -0700 Subject: Markdown reader: Fixed small bug in HTML parsing with markdown_attribute. Test case: Previously gave:

hi

--- src/Text/Pandoc/Readers/Markdown.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 01db5a13c..4120a5a11 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -1404,8 +1404,7 @@ escapedChar = do ltSign :: MarkdownParser (F Inlines) ltSign = do guardDisabled Ext_raw_html - <|> guardDisabled Ext_markdown_in_html_blocks - <|> (notFollowedBy' (htmlTag isBlockTag) >> return ()) + <|> (notFollowedByHtmlCloser >> notFollowedBy' (htmlTag isBlockTag)) char '<' return $ return $ B.str "<" @@ -1797,7 +1796,9 @@ rawHtmlInline = do Just t' -> t ~== TagClose t' Nothing -> False mdInHtml <- option False $ - guardEnabled Ext_markdown_in_html_blocks >> return True + ( guardEnabled Ext_markdown_in_html_blocks + <|> guardEnabled Ext_markdown_attribute + ) >> return True (_,result) <- htmlTag $ if mdInHtml then (\x -> isInlineTag x && not (isCloseBlockTag x)) -- cgit v1.2.3