Fix date parsing issue for org mode plugin

This patch fixes the date parsing issue currently when an entry like
`todo +d 22 01 2022` is used. I have added tests too which demonstrate
the current issue so that we can prevent future regression.
This commit is contained in:
Sibi Prabakaran
2021-12-29 14:58:46 +05:30
parent 769e5f9c94
commit 91f1a0de1e
3 changed files with 37 additions and 0 deletions

View File

@@ -52,6 +52,7 @@ module XMonad.Util.Parser (
endBy1,
munch,
munch1,
pfail
) where
import XMonad.Prelude
@@ -136,6 +137,10 @@ instance Alternative Parser where
runParser :: Parser a -> String -> Maybe a
runParser (Parser p) = fmap fst . listToMaybe . ReadP.readP_to_S p
-- | Always fails
pfail :: Parser a
pfail = Parser $ ReadP.pfail
-- | Consume and return the next character. Fails if there is no input
-- left.
get :: Parser Char