From b95f391bebdd6d79b11db4469d97640e80285ccc Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Mon, 26 Jun 2017 09:40:53 +0300 Subject: Muse reader: simplify para implementation (#3761) --- src/Text/Pandoc/Readers/Muse.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Readers') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index fe8a55f5c..06d385222 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -247,9 +247,7 @@ commentTag :: PandocMonad m => MuseParser m (F Blocks) commentTag = parseHtmlContent "comment" block >> return mempty para :: PandocMonad m => MuseParser m (F Blocks) -para = do - res <- trimInlinesF . mconcat <$> many1Till inline endOfParaElement - return $ B.para <$> res +para = liftM B.para . trimInlinesF . mconcat <$> many1Till inline endOfParaElement where endOfParaElement = lookAhead $ endOfInput <|> endOfPara <|> newBlockElement endOfInput = try $ skipMany blankline >> skipSpaces >> eof -- cgit v1.2.3