Muse reader: simplify listItemContents' with sepBy1
This commit is contained in:
parent
5439e29dd9
commit
ca4a61a348
1 changed files with 2 additions and 4 deletions
|
@ -454,10 +454,8 @@ withListContext p = do
|
|||
return parsed
|
||||
|
||||
listItemContents' :: PandocMonad m => Int -> MuseParser m (F Blocks)
|
||||
listItemContents' col = do
|
||||
first <- try $ withListContext parseBlock
|
||||
rest <- many $ try (skipMany blankline >> indentWith col >> withListContext parseBlock)
|
||||
return $ mconcat (first : rest)
|
||||
listItemContents' col =
|
||||
mconcat <$> withListContext (parseBlock `sepBy1` try (skipMany blankline >> indentWith col))
|
||||
|
||||
listItemContents :: PandocMonad m => MuseParser m (F Blocks)
|
||||
listItemContents = do
|
||||
|
|
Loading…
Add table
Reference in a new issue