mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-08-18 05:33:49 -07:00
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