mirror of
https://github.com/xxjwxc/public.git
synced 2025-09-26 11:51:14 +08:00
1
This commit is contained in:
@@ -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 {
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user