From b6f51c33c75a4d94cec48ab66f8bbb3f8b14e6f4 Mon Sep 17 00:00:00 2001 From: Rockingcool Date: Tue, 6 May 2025 17:05:19 -0500 Subject: [PATCH] Parse until EOF instead of adding a manual check. --- src/MdToHTML.hs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/MdToHTML.hs b/src/MdToHTML.hs index d3d358f..c1bbe2b 100644 --- a/src/MdToHTML.hs +++ b/src/MdToHTML.hs @@ -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.