mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -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 :: String -> ReadP String
|
||||||
getLast ptn = go ""
|
getLast ptn = go ""
|
||||||
where
|
where
|
||||||
go :: String -> ReadP String = \consumed -> do
|
go :: String -> ReadP String
|
||||||
next <- munch1 (/= head ptn)
|
go consumed = do
|
||||||
|
next <- munch (/= head ptn)
|
||||||
next' <- munch1 (/= ' ')
|
next' <- munch1 (/= ' ')
|
||||||
if next' == ptn
|
if next' == ptn
|
||||||
then -- If we're done, it's time to prune extra whitespace
|
then -- If we're done, it's time to prune extra whitespace
|
||||||
|
Loading…
x
Reference in New Issue
Block a user