This commit is contained in:
xxjwxc
2022-04-01 16:59:26 +08:00
parent 886f51993e
commit e83ad075b0
2 changed files with 5 additions and 3 deletions

View File

@@ -152,8 +152,10 @@ func (node *Node) contains(text string, root map[string]*Node) bool {
return true
}
point = n.Child
index = i
jump = true
if !jump {
index = i
jump = true
}
}
} else {
if jump {

View File

@@ -16,7 +16,7 @@ func TestWordsFilter(t *testing.T) {
// wf.Placeholder = ""
root := wf.Generate(texts)
wf.Remove("shif", root)
c1 := wf.Contains("你爱液", root) // 是否有敏感词
c1 := wf.Contains("你爱液", root) // 是否有敏感词
if c1 != false {
t.Errorf("Test Contains expect false, get %T, %v", c1, c1)
}