Parse until EOF instead of adding a manual check.
This commit is contained in:
@@ -154,9 +154,7 @@ parseLine :: ReadP MdToken
|
||||
parseLine = do
|
||||
skipSpaces
|
||||
-- Fail if we have reached the end of the document.
|
||||
remaining <- look
|
||||
when (null remaining) pfail
|
||||
parsed <- parseMany parseLineToken
|
||||
parsed <- manyTill parseLineToken eof
|
||||
return (Line parsed)
|
||||
|
||||
-- Parse a paragraph, which is a 'Line' (can span multiple actual lines), separated by double-newlines.
|
||||
|
Reference in New Issue
Block a user