hxbrief: Support exact matches

master
Lennart Spitzner 2022-03-08 19:59:40 +00:00
parent f4cde7248a
commit 7105c6cd95
1 changed files with 3 additions and 2 deletions

View File

@ -171,6 +171,7 @@ matchPattern pat s = case break (== '*') pat of
then error "only one glob supported in patterns!"
else start `isPrefixOf` s && rest `isSuffixOf` s
("" , "") -> error "empty pattern"
(exact, "") -> exact == s
_ -> undefined
dispatchLine :: (StreamKind, String) -> StateT State IO ()