diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-07-20 17:22:29 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-07-20 17:22:29 -0700 |
commit | a243afb55104b0e5e1ddf62f301477a545381634 (patch) | |
tree | d08b2290598f39ea8f58c9cd05072452ee7312a4 | |
parent | 4d2e6e826de6ad5f39c5e7f7b8fd5e3355917a73 (diff) | |
download | pandoc-a243afb55104b0e5e1ddf62f301477a545381634.tar.gz |
Markdown reader: Fixed small bug in HTML parsing with markdown_attribute.
Test case:
<aside markdown="1">
*hi*
</aside>
Previously gave:
<article markdown="1">
<p><em>hi</em> </article></p>
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 7 |
1 files changed, 4 insertions, 3 deletions
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)) |