aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-06-19 23:16:21 +0300
committerJohn MacFarlane <jgm@berkeley.edu>2017-06-19 22:16:21 +0200
commit4929d027dc57151dc7f009347478b35b90d2373b (patch)
tree038d7b6212d68eed1535e33728e98d3e28237ae1
parent564c77964ddbbdc5541086726b9109091119e140 (diff)
downloadpandoc-4929d027dc57151dc7f009347478b35b90d2373b.tar.gz
Muse reader: fix list item continuation parsing (#3747)
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs4
-rw-r--r--test/Tests/Readers/Muse.hs13
2 files changed, 15 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index bc9da26cb..c1ea1354b 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -295,9 +295,9 @@ withListContext p = do
listContinuation :: PandocMonad m => Int -> MuseParser m String
listContinuation markerLength = try $ do
- result <- many1 $ listLine markerLength
blanks <- many1 blankline
- return $ concat result ++ blanks
+ result <- many1 $ listLine markerLength
+ return $ blanks ++ concat result
listStart :: PandocMonad m => MuseParser m Int -> MuseParser m Int
listStart marker = try $ do
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 5a896da55..85d6f5c48 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -260,5 +260,18 @@ tests =
]
]
]
+ , "List continuation" =:
+ T.unlines
+ [ " - a"
+ , ""
+ , " b"
+ , ""
+ , " c"
+ ] =?>
+ bulletList [ mconcat [ para "a"
+ , para "b"
+ , para "c"
+ ]
+ ]
]
]