release branch 0.13.1

This commit is contained in:
houbb
2024-02-28 16:17:36 +08:00
parent 1ce25892f1
commit de16415087
6 changed files with 27 additions and 5 deletions

View File

@@ -231,3 +231,9 @@
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
|:---|:-----|-----------------------------------|:--------------------|:------|
| 1 | A | 对匹配后的单词,额外可以做一次校验,比如做一次英文全词匹配的验证。 | 2024-02-19 23:51:58 | |
# release_0.13.1
| 序号 | 变更类型 | 说明 | 时间 | 备注 |
|:---|:-----|------------|:-------------------|:-------------------------------------------------|
| 1 | F | 修正单词匹配 BUG | 2024-2-28 16:16:42 | https://github.com/houbb/sensitive-word/pull/47 |

View File

@@ -82,7 +82,7 @@
<dependency>
<groupId>com.github.houbb</groupId>
<artifactId>sensitive-word</artifactId>
<version>0.13.0</version>
<version>0.13.1</version>
</dependency>
```

View File

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

View File

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

View File

@@ -34,6 +34,7 @@ public class WordResultConditionEnglishWordMatch extends AbstractWordResultCondi
return false;
}
}
// 判断当前是否为英文单词
for(int i = startIndex; i < endIndex; i++) {
char c = text.charAt(i);
@@ -42,8 +43,6 @@ public class WordResultConditionEnglishWordMatch extends AbstractWordResultCondi
}
}
return true;
}

View File

@@ -103,4 +103,21 @@ public class SensitiveWordBsResultConditionTest {
Assert.assertEquals("[day]", wordList.toString());
}
@Test
public void englishWordMatchTest5() {
final String text = "test for International Congress";
List<String> wordList = SensitiveWordBs.newInstance()
.wordDeny(new IWordDeny() {
@Override
public List<String> deny() {
return Arrays.asList("national Congress");
}
})
.wordResultCondition(WordResultConditions.englishWordMatch())
.init()
.findAll(text);
Assert.assertEquals("[]", wordList.toString());
}
}