fix: fix SensitiveWords error
This commit is contained in:
1 parent
8b96117839
commit
a5088f5e23
4 files changed
+22
-12
No files matched your search
@@ -40,7 +40,7 @@ func SensitiveWordReplace(text string, returnImmediately bool) (bool, []string,
|
||||
for _, hit := range hits {
|
||||
pos := hit.Pos
|
||||
word := string(hit.Word)
|
||||
text = text[:pos] + "*###*" + text[pos+len(word):]
|
||||
text = text[:pos] + "**###**" + text[pos+len(word):]
|
||||
words = append(words, word)
|
||||
}
|
||||
return true, words, text
|
||||
|
||||
Reference in new issue
Block a user