Skip to content

Commit

Permalink
Fix: filter out punctuation when splitting words
Browse files Browse the repository at this point in the history
  • Loading branch information
Gegy committed Jun 18, 2024
1 parent d456e78 commit df111cd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class ChatFilterConfig {
Registries.SOUND_EVENT.createEntryCodec().optionalFieldOf("feedback_sound").forGetter(c -> Optional.ofNullable(c.feedbackSound))
).apply(i, ChatFilterConfig::new));

private static final Splitter WORD_SPLITTER = Splitter.onPattern("\\s");
private static final Splitter WORD_SPLITTER = Splitter.onPattern("\\W");

private final Set<String> illegalWords;
private final List<String> containsIllegalText;
Expand Down

0 comments on commit df111cd

Please sign in to comment.