Muse reader: simplify paragraph parsing

Blanklines are already consumed during block parsing,
there is no need to check for them specifically.
This commit is contained in:
Alexander Krotov 2018-01-21 00:47:30 +03:00
parent 957c0e110d
commit 1dd5018a80

View file

@ -341,9 +341,8 @@ para = do
let f = if st /= ListItemState && indent >= 2 && indent < 6 then B.blockQuote else id
fmap (f . B.para) . trimInlinesF . mconcat <$> many1Till inline endOfParaElement
where
endOfParaElement = lookAhead $ endOfInput <|> endOfPara <|> newBlockElement
endOfParaElement = lookAhead $ endOfInput <|> newBlockElement
endOfInput = try $ skipMany blankline >> skipSpaces >> eof
endOfPara = try $ blankline >> skipMany1 blankline
newBlockElement = try $ blankline >> void blockElements
noteMarker :: PandocMonad m => MuseParser m String