Expected behavior
Entering f u c k and f u ck using the default english match should count as profanity.
Actual behavior
Entries like fu ck are picked up but f u c k and f u ck are not. So is s h i t and any other similarly spaced profanity.
Minimal reproducible example
import {
englishDataset,
englishRecommendedTransformers,
RegExpMatcher,
} from "obscenity";
const matcher = new RegExpMatcher({
...englishDataset.build(),
...englishRecommendedTransformers,
});
export function containsProfanity(text: string): boolean {
return matcher.hasMatch(text);
}
console.log(containsProfanity("f u c k"))
Steps to reproduce
No response
Additional context
No response
Node.js version
v20.11.0
Obscenity version
v0.4.3
Priority
Terms
Expected behavior
Entering
f u c kandf u ckusing the default english match should count as profanity.Actual behavior
Entries like
fu ckare picked up butf u c kandf u ckare not. So iss h i tand any other similarly spaced profanity.Minimal reproducible example
Steps to reproduce
No response
Additional context
No response
Node.js version
v20.11.0
Obscenity version
v0.4.3
Priority
Terms