1
0
mirror of https://github.com/xmonad/xmonad-contrib.git synced 2025-08-18 05:33:49 -07:00
Files
xmonad-contrib/XMonad/Prompt
slotThe b42303aa6f X.P.OrgMode: Fix behaviour of getLast
So far, while parsing strings like "<ptn><more-letters>", the `getLast`
function immediately stopped on strings of the form "<ptn><whitespace>".
This may be a bit confusing given the functions name.  Strings of
the—perhaps artificial—form

    "a +d f 1 +d f 2"

would be cut short and parsed as

    Deadline "a" (Time { date = Next Friday, tod = Just 01:00 })

instead of the more intuitive

    Deadline "a +d f 1" (Time { date = Next Friday, tod = Just 02:00 }).

This is readily fixed by applying the `go` parser as often as possible,
only returning the longest list, and then pruning eventual leftovers at
the end of the string.  Since we were already invoking `dropWhileEnd` to
trim whitespace before, the added `reverse`s should not impact
performance at all.

Fixes: https://github.com/xmonad/xmonad-contrib/issues/584
2021-08-11 07:11:54 +02:00
..
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-06-06 18:59:05 +02:00
2021-03-16 14:13:24 +01:00
2021-06-06 18:59:05 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-05-13 17:44:47 +02:00
2021-06-18 14:10:23 +02:00
2021-05-13 17:44:47 +02:00
2021-06-06 18:59:05 +02:00
2021-05-13 17:44:47 +02:00
2021-06-18 14:10:23 +02:00