diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-12-07 17:12:52 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-12-07 17:12:52 -0800 |
commit | e5a7c31a32b2b53ef5073355b70dc17ecf1d16af (patch) | |
tree | 4cb10ad2a73e539e69e8111669502caa727c244c /src | |
parent | 4f64a4bc3bbd7e976635bcf5752633895a5aa3d8 (diff) | |
download | pandoc-e5a7c31a32b2b53ef5073355b70dc17ecf1d16af.tar.gz |
Markdown reader: Fixed bug with literal `</div>` in lists.
Closes #1078.
Diffstat (limited to 'src')
-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 11168bc09..c32c5ed86 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -732,8 +732,9 @@ listLine = try $ do notFollowedBy' (do indentSpaces many (spaceChar) listStart) - chunks <- manyTill (liftM snd (htmlTag isCommentTag) <|> count 1 (satisfy (/='<')) - <|> (notFollowedBy' (htmlTag isBlockTag) >> count 1 anyChar)) newline + notFollowedBy' $ htmlTag (~== TagClose "div") + chunks <- manyTill (liftM snd (htmlTag isCommentTag) <|> count 1 anyChar) + newline return $ concat chunks -- parse raw text for one list item, excluding start marker and continuations @@ -760,7 +761,7 @@ listContinuationLine :: MarkdownParser String listContinuationLine = try $ do notFollowedBy blankline notFollowedBy' listStart - notFollowedBy' $ try $ skipMany spaceChar >> htmlTag (~== TagClose "div") + notFollowedBy' $ htmlTag (~== TagClose "div") optional indentSpaces result <- anyLine return $ result ++ "\n" |