What's wrong
In the regex ByWordAll path (TextFilter/TextFilter.cs:~460-464), ExtractTextTokens returns an empty set for "" or " ". The check then runs Enumerable.All over that set, and All on an empty sequence is true. So text with no words is reported as matching every pattern. The glob path returns false for the same input.
Failure scenario (verified with a temporary MSTest)
IsMatch("", "zzz", TextFilterType.Regex, TextFilterMatchOptions.ByWordAll); // true
IsMatch(" ", "zzz", TextFilterType.Regex, TextFilterMatchOptions.ByWordAll); // true
IsMatch("", "zzz", TextFilterType.Glob, TextFilterMatchOptions.ByWordAll); // false
Filter(["", "hello"], "zzz", TextFilterType.Regex, TextFilterMatchOptions.ByWordAll); // [""]
In a list UI, blank entries stay visible whatever the user types. The two filter types also disagree on the same input.
Suggested fix
In the regex ByWordAll branch, return false when textTokens.Count == 0, which matches the glob path. Alternatively, fall back to matching the whole string.
Acceptance: all four calls above return false, or [] for Filter, and a test covers both filter types.
What's wrong
In the regex
ByWordAllpath (TextFilter/TextFilter.cs:~460-464),ExtractTextTokensreturns an empty set for""or" ". The check then runsEnumerable.Allover that set, andAllon an empty sequence istrue. So text with no words is reported as matching every pattern. The glob path returnsfalsefor the same input.Failure scenario (verified with a temporary MSTest)
In a list UI, blank entries stay visible whatever the user types. The two filter types also disagree on the same input.
Suggested fix
In the regex
ByWordAllbranch, returnfalsewhentextTokens.Count == 0, which matches the glob path. Alternatively, fall back to matching the whole string.Acceptance: all four calls above return
false, or[]forFilter, and a test covers both filter types.