summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-02-26 22:53:12 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-02-26 22:53:12 -0800
commit4d0bf3c5d685cbee3b13f562503a572af803ab95 (patch)
treeefe8cfe064759620ae6c8781e8f2a59f0c931b12
parenta208a972c318c1cb37551d9662a61b7c7ab35510 (diff)
Markdown reader: Improved parsing of nested divs.
Formerly a closing div tag would be missed if it came right after other block-level tags.
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index 9feb46f97..0ea7f9ac5 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -954,6 +954,8 @@ rawHtmlBlocks = do
htmlBlocks <- many1 $ try $ do
s <- rawVerbatimBlock <|> try (
do (t,raw) <- htmlTag isBlockTag
+ guard $ t ~/= TagOpen "div" [] &&
+ t ~/= TagClose "div"
exts <- getOption readerExtensions
-- if open tag, need markdown="1" if
-- markdown_attributes extension is set