diff --git a/src/MdToHTML.hs b/src/MdToHTML.hs
index 5e893e1..6408fb6 100644
--- a/src/MdToHTML.hs
+++ b/src/MdToHTML.hs
@@ -218,26 +218,13 @@ parseQuotedLine = do
return restOfLine
-- Parse many 'quoted lines' until I see a non-quoted line.
--- There HAS to be a better way of doing this, but I'm not sure what it is.
--- I rewrote it because I wanted it to consume all input, rather than being non-deterministic
--- and giving all intermediate parse results.
parseQuotedLines :: ReadP [String]
parseQuotedLines =
- manyTill
- ( do
- look >>= \line ->
- case line of
- ('>' : _) -> parseQuotedLine
- _ -> pfail
- )
- ( ( do
- look >>= \line ->
- case line of
- ('>' : _) -> pfail
- _ -> return ()
- )
- <* eof
- )
+ greedyParse1 $ do
+ look >>= \line ->
+ case line of
+ ('>' : _) -> parseQuotedLine
+ _ -> pfail
-- Parse a blockquote, which is a greater-than sign followed by a paragraph.
parseBlockquote :: ReadP MdToken