release branch 0.19.2

This commit is contained in:
binbin.hou
2024-08-28 10:30:06 +08:00
parent cf80e0b422
commit 482384ef85
6 changed files with 29 additions and 4 deletions

View File

@@ -349,3 +349,9 @@
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
|:---|:-----|-------------------------------|:-------------------|:---|
| 1 | F | 修正 englishWordMatch 单个字符误判的问题 | 2024-8-28 15:02:25 | https://github.com/houbb/sensitive-word/issues/69 |
# release_0.19.2
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
|:---|:-----|--------------------------------------------------------|:-------------------|:--------------------------------------------------|
| 1 | F | 修正 #68 SensitiveWordCharIgnores.specialChars() 误判命中开始的问题 | 2024-8-28 15:02:25 | https://github.com/houbb/sensitive-word/issues/68 |

View File

@@ -63,6 +63,10 @@
- 修正 englishWordMatch #69 单个英文字符命中错误问题
### V0.19.2
- 修正 #68 `SensitiveWordCharIgnores.specialChars()` 误判命中开始的问题
## 更多资料
### 敏感词控台
@@ -93,7 +97,7 @@
<dependency>
<groupId>com.github.houbb</groupId>
<artifactId>sensitive-word</artifactId>
<version>0.19.1</version>
<version>0.19.2</version>
</dependency>
```

View File

@@ -6,7 +6,7 @@
<groupId>com.github.houbb</groupId>
<artifactId>sensitive-word</artifactId>
<version>0.19.1</version>
<version>0.19.2</version>
<properties>
<!--============================== All Plugins START ==============================-->

View File

@@ -10,7 +10,7 @@ ECHO "============================= RELEASE START..."
:: 版本号信息(需要手动指定)
:::: 旧版本名称
SET version=0.19.1
SET version=0.19.2
:::: 新版本名称
SET newVersion=0.20.0
:::: 组织名称

View File

@@ -53,7 +53,8 @@ public class WordCheckWord extends AbstractWordCheck {
int tempLen = 0;
for(int i = beginIndex; i < rawChars.length; i++) {
// 判断是否跳过?
if(wordCharIgnore.ignore(i, rawChars, innerContext)) {
// 避免开始的时候命中 https://github.com/houbb/sensitive-word/issues/68
if(wordCharIgnore.ignore(i, rawChars, innerContext) && tempLen != 0) {
tempLen++;
continue;
}

View File

@@ -36,4 +36,18 @@ public class SensitiveWordBsIgnoreCharTest {
Assert.assertEquals("[傻@冒, 狗+东西]", wordList2.toString());
}
//https://github.com/houbb/sensitive-word/issues/68
@Test
public void ignoreChineseStyleTest2() {
final String text = "<p>傻逼</p>";
// 指定忽略的字符策略,可自行实现。
List<String> wordList2 = SensitiveWordBs.newInstance()
.charIgnore(SensitiveWordCharIgnores.specialChars())
.init()
.findAll(text);
Assert.assertEquals("[傻逼]", wordList2.toString());
}
}