git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: fix list item continuation parsing (#3747)
commit4929d027dc57151dc7f009347478b35b90d2373b authorAlexander Krotov <ilabdsf@gmail.com> dateMon 19 Jun 2017, 23:16 (9 years ago) parent564c779
2 files changed+15−2
src/Text/Pandoc/Readers/Muse.hs+2−2 test/Tests/Readers/Muse.hs+13
src/Text/Pandoc/Readers/Muse.hs+2−2
@@ -295,9 +295,9 @@ withListContext p = do
295295
296296listContinuation :: PandocMonad m => Int -> MuseParser m String
297297listContinuation markerLength = try $ do
298− result <- many1 $ listLine markerLength
299298 blanks <- many1 blankline
300− return $ concat result ++ blanks
299+ result <- many1 $ listLine markerLength
300+ return $ blanks ++ concat result
301301
302302listStart :: PandocMonad m => MuseParser m Int -> MuseParser m Int
303303listStart marker = try $ do
test/Tests/Readers/Muse.hs+13
@@ -260,5 +260,18 @@ tests =
260260 ]
261261 ]
262262 ]
263+ , "List continuation" =:
264+ T.unlines
265+ [ " - a"
266+ , ""
267+ , " b"
268+ , ""
269+ , " c"
270+ ] =?>
271+ bulletList [ mconcat [ para "a"
272+ , para "b"
273+ , para "c"
274+ ]
275+ ]
263276 ]
264277 ]