-
-
Notifications
You must be signed in to change notification settings - Fork 57
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
The program
package main
import (
"fmt"
"github.com/TwinProduction/go-away"
)
func main() {
test("shit")
test("shiit")
test("shiiiiiit")
}
func test(word string) {
fmt.Printf("\"%s\" profane? %t\n", word, goaway.IsProfane(word))
}prints
"shit" profane? true
"shiit" profane? false
"shiiiiiit" profane? false
I suggest you include a list of regexes to match cases such as this.
An alternative would be to collapse all repeated characters before matching, although this would have an issue with any profanities that contain repeated characters that are no longer profane once collapsed.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers