lib: periodexprp: don't consume trailing whitespace

This commit is contained in:
Simon Michael 2018-06-12 16:39:17 -07:00
parent c6bfd92dd3
commit eb23504906

View File

@ -919,7 +919,9 @@ lastthisnextthing = do
-- >>> p "every 2nd day of month 2009-"
-- Right (DayOfMonth 2,DateSpan 2009/01/01-)
periodexprp :: Day -> TextParser m (Interval, DateSpan)
periodexprp rdate = surroundedBy (skipMany spacenonewline) . choice $ map try [
periodexprp rdate = do
skipMany spacenonewline
choice $ map try [
intervalanddateperiodexprp rdate,
(,) NoInterval <$> periodexprdatespanp rdate
]