Parse until EOF instead of adding a manual check.

This commit is contained in:
2025-05-06 17:05:19 -05:00
parent 9ffbb7365c
commit b6f51c33c7

View File

@@ -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.