aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-04-01 10:36:23 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-04-01 10:36:23 -0700
commit4ee92dce0ce624db2d02c60ae2856a70cfeb6c42 (patch)
treefe48a278c4768f02c8264ee3d90fffc7d1904713 /src/Text/Pandoc
parent976f4f2d8fd8b5b984da52dc63d665038c4d023f (diff)
downloadpandoc-4ee92dce0ce624db2d02c60ae2856a70cfeb6c42.tar.gz
MediaWiki reader: Fixed bug in certain nested lists.
The bug: If a level 2 list was followed by a level 1 list, the first item of the level 1 list would be lost. Closes #1213.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/MediaWiki.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/MediaWiki.hs b/src/Text/Pandoc/Readers/MediaWiki.hs
index f70b44aad..9bbabd44b 100644
--- a/src/Text/Pandoc/Readers/MediaWiki.hs
+++ b/src/Text/Pandoc/Readers/MediaWiki.hs
@@ -438,7 +438,8 @@ listItem c = try $ do
skipMany spaceChar
first <- concat <$> manyTill listChunk newline
rest <- many
- (try $ string extras *> (concat <$> manyTill listChunk newline))
+ (try $ string extras *> lookAhead listStartChar *>
+ (concat <$> manyTill listChunk newline))
contents <- parseFromString (many1 $ listItem' c)
(unlines (first : rest))
case c of