diff --git a/falsenegatives.go b/falsenegatives.go index 7331a27..dc4bfb0 100644 --- a/falsenegatives.go +++ b/falsenegatives.go @@ -4,7 +4,7 @@ package goaway // // This is reserved for words that may be incorrectly filtered as false positives. // -// Alternatively, words that are long, or that should mark a string as profane no what the context is +// Alternatively, words that are long, or that should mark a string as profane no matter what the context is // or whether the word is part of another word can also be included. // // Note that there is a test that prevents words from being in both DefaultProfanities and DefaultFalseNegatives, diff --git a/goaway_test.go b/goaway_test.go index 5d4c0eb..210cd8a 100644 --- a/goaway_test.go +++ b/goaway_test.go @@ -150,6 +150,11 @@ func TestProfanityDetector_Censor(t *testing.T) { expectedOutput: "document **** document ****", expectedOutputWithoutSpaceSanitization: "document **** document ****", }, + { + input: "Everyone was staring, and someone muttered ‘gyat’ under their breath.", + expectedOutput: "Everyone was staring, and someone muttered ‘****’ under their breath.", + expectedOutputWithoutSpaceSanitization: "Everyone was staring, and someone muttered ‘****’ under their breath.", + }, } for _, tt := range tests { t.Run("default_"+tt.input, func(t *testing.T) { diff --git a/profanities.go b/profanities.go index 11a304c..7bf8ac4 100644 --- a/profanities.go +++ b/profanities.go @@ -41,6 +41,7 @@ var DefaultProfanities = []string{ "fudgepacker", "flange", "gtfo", + "gyat", "hoe", // while that's also a tool, I doubt somebody would be checking for profanities if that tool was relevant "horny", "incest",