Bug: collapseDuplicatesTransformer
does not collapse the last letter
#77
Labels
bug
Something isn't working
Expected behavior
Using
obscenity
to censor a string containing repeating characters such aspppiiittt
and a dataset that contains the wordpit
.Using:
I would expect the whole
pppiiittt
word to be matched.Actual behavior
Instead, only the first
t
is detected, matchingpppiiit
. The final twot
are "not a part of the profanity", while they should be.Minimal reproducible example
Steps to reproduce
No response
Additional context
No response
Node.js version
18.17.1
Obscenity version
0.4.0
Priority
Terms
The text was updated successfully, but these errors were encountered: