Skip to content
This repository has been archived by the owner on Dec 19, 2020. It is now read-only.

Substring issue #23

Open
tejaschaphalkar opened this issue May 28, 2015 · 1 comment
Open

Substring issue #23

tejaschaphalkar opened this issue May 28, 2015 · 1 comment

Comments

@tejaschaphalkar
Copy link

Would like to know whether this gem has the feature to handle substrings.

Ex.:
blacklisted word: shitting
text: shit here

Alsovice versa,
Ex.: blacklisted word: shit
text: he's shitting here

I ask since I was not able to get the above two examples to work.

Thank you!

@fredxinfan
Copy link

Hi @tejaschaphalkar , you can replace the default blacklist.yml with the Regex version. I've created a gist here https://gist.github.com/fredxinfan/1b3fdb822aa770ebfd1b. Please note potentially the Regex may filter out the words that isn't supposed to be profane. When that happens use Obscenity.offensive("text") to work out which Regex breaking it from your console.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants