mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 03:20:21 -07:00
X.P.OrgMode: Parse empty message
Empty messages seem quite useless, but it's an easy fix for the parser to be able to deal with them, so do it.
This commit is contained in:
parent
c1cb3aaa24
commit
4b15ea2ecc
@ -339,8 +339,9 @@ pInput inp = fmap fst . listToMaybe . (`readP_to_S` inp) . lchoice $
|
||||
getLast :: String -> ReadP String
|
||||
getLast ptn = go ""
|
||||
where
|
||||
go :: String -> ReadP String = \consumed -> do
|
||||
next <- munch1 (/= head ptn)
|
||||
go :: String -> ReadP String
|
||||
go consumed = do
|
||||
next <- munch (/= head ptn)
|
||||
next' <- munch1 (/= ' ')
|
||||
if next' == ptn
|
||||
then -- If we're done, it's time to prune extra whitespace
|
||||
|
Loading…
x
Reference in New Issue
Block a user