mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-17 21:33:46 -07:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user