git.iko.soy/typeable/pandoc
on master help sign in
Muse reader: simplify listItemContents' with sepBy1
ca4a61aAlexander Krotov
src/Text/Pandoc/Readers/Muse.hs+2−4
@@ -454,10 +454,8 @@ withListContext p = do
454 return parsed
454 return parsed
455
455
456listItemContents' :: PandocMonad m => Int -> MuseParser m (F Blocks)
456listItemContents' :: PandocMonad m => Int -> MuseParser m (F Blocks)
457−listItemContents' col = do
457+listItemContents' col =
458− first <- try $ withListContext parseBlock
458+ mconcat <$> withListContext (parseBlock `sepBy1` try (skipMany blankline >> indentWith col))
459− rest <- many $ try (skipMany blankline >> indentWith col >> withListContext parseBlock)
460− return $ mconcat (first : rest)
461
459
462listItemContents :: PandocMonad m => MuseParser m (F Blocks)
460listItemContents :: PandocMonad m => MuseParser m (F Blocks)
463listItemContents = do
461listItemContents = do