Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype MatchPolicy = MatchPolicy {
- _unMatchPolicy :: Vector Text -> Parser Text
- passBlacklist :: MatchPolicy -> Vector Text -> Text -> Maybe Text
- banExact :: MatchPolicy
- banAlmostExact :: MatchPolicy
- exampleReserved :: Vector Text
Documentation
newtype MatchPolicy Source
passBlacklist :: MatchPolicy -> Vector Text -> Text -> Maybe Text Source
banExact :: MatchPolicy Source
Parses sucessfully (which means the word gets blocked) if any of the Texts in the blacklist are an exact match.
banAlmostExact :: MatchPolicy Source
Parses sucessfully (which means the word gets blocked) if any of the Texts in the blacklist are a match.
Case is ignored for ASCII characters. Non-alphabetic Unicode characters at either the start of the end of the word can be skipped.
E.g. " Admin" is banned against ["admin"], but "a admin" isn't.