Fixed blank lines in banned words file issues.
Blank lines resulted in lots of chat being muted which shouldn't have been.
This commit is contained in:
parent
3611c09e7d
commit
41401abfaf
|
|
@ -15,7 +15,10 @@ class WordFinder
|
||||||
StringBuilder patternBuilder = new StringBuilder();
|
StringBuilder patternBuilder = new StringBuilder();
|
||||||
for(String word : wordsToFind)
|
for(String word : wordsToFind)
|
||||||
{
|
{
|
||||||
patternBuilder.append("|(([^\\w]|^)" + Pattern.quote(word) + "([^\\w]|$))");
|
if(!word.isEmpty() && !word.trim().isEmpty())
|
||||||
|
{
|
||||||
|
patternBuilder.append("|(([^\\w]|^)" + Pattern.quote(word) + "([^\\w]|$))");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
String patternString = patternBuilder.toString();
|
String patternString = patternBuilder.toString();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user