ignore notes when deciding to show a group

fix #1
This commit is contained in:
rhiannon morris 2023-02-11 23:35:15 +01:00
parent 45674394e8
commit 8428d0dd06
1 changed files with 4 additions and 5 deletions

View File

@ -332,11 +332,10 @@ mutual
filterMatch1 : String -> Test -> Maybe Test
filterMatch1 pat test@(One base) =
guard (pat `isInfixOf` base.label) $> test
filterMatch1 pat all@(Group label tests) =
if pat `isInfixOf` label then Just all else
case filterMatch (Just pat) tests of
[] => Nothing
res => Just $ Group label res
filterMatch1 pat whole@(Group label tests) =
if pat `isInfixOf` label then Just whole else
let res = filterMatch (Just pat) tests in
guard (any isRealTest res) $> Group label res
filterMatch1 pat note@(Note _) = Just note