xavier/expletive

Match substrings on profane?/2

Opened this issue · 0 comments

Problem

When using the profane?/2 function with the built in blacklists. It will not catch sub-strings. for example:

iex> config = Expletive.configure(blacklist: Expletive.Blacklist.english)

iex> Expletive.profane?("fuck", config)
true

iex> Expletive.profane?("fuckkkk", config)
false 

To me it seems like the last one should also return true. I can try to help with this change if it is desired. Thanks!