lib: Hledger.Utils.Parse: restofline can go to eof also

This commit is contained in:
Simon Michael 2020-02-28 01:54:26 -08:00
parent 8ad2ea2fb4
commit c3680b868b

View File

@ -127,7 +127,7 @@ spacenonewline :: (Stream s, Char ~ Token s) => ParsecT CustomErr s m Char
spacenonewline = satisfy isNonNewlineSpace
restofline :: TextParser m String
restofline = anySingle `manyTill` newline
restofline = anySingle `manyTill` eolof
eolof :: TextParser m ()
eolof = (newline >> return ()) <|> eof