mirror of
https://github.com/houbb/sensitive-word.git
synced 2026-03-22 08:27:36 +08:00
[Feature] add for new
This commit is contained in:
@@ -314,6 +314,8 @@ public class SensitiveWordBs {
|
||||
* (1)如果不存在,则返回 {@code null}
|
||||
*
|
||||
* @param target 目标字符串
|
||||
* @param handler 处理类
|
||||
* @param <R> 泛型
|
||||
* @return 敏感词
|
||||
* @since 0.0.1
|
||||
*/
|
||||
|
||||
@@ -88,6 +88,7 @@ public final class SensitiveWordHelper {
|
||||
*
|
||||
* @param target 目标字符串
|
||||
* @param handler 结果处理类
|
||||
* @param <R> 泛型
|
||||
* @return 敏感词列表
|
||||
* @since 0.1.0
|
||||
*/
|
||||
|
||||
@@ -8170,7 +8170,6 @@ wpobn
|
||||
wseqrq
|
||||
wwcz60
|
||||
wwcz61
|
||||
www.
|
||||
www71axcom裸聊
|
||||
www点63se点cc
|
||||
www点759699点com
|
||||
|
||||
@@ -22,7 +22,9 @@ public class SensitiveWordBsRepeatTest {
|
||||
public void ignoreChineseStyleTest() {
|
||||
final String text = "ⒻⒻⒻfⓤuⓤ⒰cⓒ⒦ the bad words";
|
||||
|
||||
List<String> wordList = SensitiveWordBs.newInstance().findAll(text);
|
||||
List<String> wordList = SensitiveWordBs.newInstance()
|
||||
.ignoreRepeat(true)
|
||||
.findAll(text);
|
||||
Assert.assertEquals("[ⒻⒻⒻfⓤuⓤ⒰cⓒ⒦]", wordList.toString());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user