git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: simplify listItemContents' with sepBy1
commitca4a61a348efcdcb3418935f45f152c291ec75a0 authorAlexander Krotov <ilabdsf@gmail.com> dateSun 4 Feb 2018, 19:19 (9 years ago) parent5439e29
1 file changed+2−4
src/Text/Pandoc/Readers/Muse.hs+2−4
src/Text/Pandoc/Readers/Muse.hs+2−4
@@ -454,10 +454,8 @@ withListContext p = do
454454 return parsed
455455
456456listItemContents' :: PandocMonad m => Int -> MuseParser m (F Blocks)
457−listItemContents' col = do
458− first <- try $ withListContext parseBlock
459− rest <- many $ try (skipMany blankline >> indentWith col >> withListContext parseBlock)
460− return $ mconcat (first : rest)
457+listItemContents' col =
458+ mconcat <$> withListContext (parseBlock `sepBy1` try (skipMany blankline >> indentWith col))
461459
462460listItemContents :: PandocMonad m => MuseParser m (F Blocks)
463461listItemContents = do