diff --git a/CHANGE_LOG.md b/CHANGE_LOG.md
index 46a7ede..d4a7e55 100644
--- a/CHANGE_LOG.md
+++ b/CHANGE_LOG.md
@@ -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 |
\ No newline at end of file
diff --git a/README.md b/README.md
index d143f59..5783fb6 100644
--- a/README.md
+++ b/README.md
@@ -82,7 +82,7 @@
com.github.houbb
sensitive-word
- 0.13.0
+ 0.13.1
```
diff --git a/pom.xml b/pom.xml
index 2a07374..7a65563 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
com.github.houbb
sensitive-word
- 0.13.0
+ 0.13.1
diff --git a/release.bat b/release.bat
index 68da911..ecf10a1 100644
--- a/release.bat
+++ b/release.bat
@@ -10,7 +10,7 @@ ECHO "============================= RELEASE START..."
:: 版本号信息(需要手动指定)
:::: 旧版本名称
-SET version=0.13.0
+SET version=0.13.1
:::: 新版本名称
SET newVersion=0.14.0
:::: 组织名称
diff --git a/src/main/java/com/github/houbb/sensitive/word/support/resultcondition/WordResultConditionEnglishWordMatch.java b/src/main/java/com/github/houbb/sensitive/word/support/resultcondition/WordResultConditionEnglishWordMatch.java
index 0c9babf..9e5f4d8 100644
--- a/src/main/java/com/github/houbb/sensitive/word/support/resultcondition/WordResultConditionEnglishWordMatch.java
+++ b/src/main/java/com/github/houbb/sensitive/word/support/resultcondition/WordResultConditionEnglishWordMatch.java
@@ -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;
}
diff --git a/src/test/java/com/github/houbb/sensitive/word/bs/SensitiveWordBsResultConditionTest.java b/src/test/java/com/github/houbb/sensitive/word/bs/SensitiveWordBsResultConditionTest.java
index f5d69a0..deddf98 100644
--- a/src/test/java/com/github/houbb/sensitive/word/bs/SensitiveWordBsResultConditionTest.java
+++ b/src/test/java/com/github/houbb/sensitive/word/bs/SensitiveWordBsResultConditionTest.java
@@ -103,4 +103,21 @@ public class SensitiveWordBsResultConditionTest {
Assert.assertEquals("[day]", wordList.toString());
}
+ @Test
+ public void englishWordMatchTest5() {
+ final String text = "test for International Congress";
+
+ List wordList = SensitiveWordBs.newInstance()
+ .wordDeny(new IWordDeny() {
+ @Override
+ public List deny() {
+ return Arrays.asList("national Congress");
+ }
+ })
+ .wordResultCondition(WordResultConditions.englishWordMatch())
+ .init()
+ .findAll(text);
+ Assert.assertEquals("[]", wordList.toString());
+ }
+
}