Muse reader: simplify para implementation (#3761)

This commit is contained in:
Alexander Krotov
2017-06-26 08:40:53 +02:00
committed by John MacFarlane
parent 4cbbc9dd58
commit b95f391beb
+1 -3
View File
@@ -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