use only POSIX-standard regexen in GenerateManpage

This commit is contained in:
Daniel Wagner 2014-05-11 15:46:02 +00:00
parent f03d2cdf74
commit 7eb6ba0126

View File

@ -43,7 +43,7 @@ trim = reverse . dropWhile isSpace . reverse . dropWhile isSpace
guessKeys line = concat $ intersperse "-" (modifiers ++ [map toLower key])
where modifiers = map (!!1) (line =~ "(mod|shift|control)Mask")
(_, _, _, [key]) = line =~ "xK_(\\w+)" :: (String, String, String, [String])
(_, _, _, [key]) = line =~ "xK_([_[:alnum:]]+)" :: (String, String, String, [String])
binding :: [String] -> (String, String)
binding [ _, bindingLine, "", desc ] = (guessKeys bindingLine, desc)