Skip to content

Commit

Permalink
Also take paratheses into account
Browse files Browse the repository at this point in the history
  • Loading branch information
hhvrc authored Sep 13, 2024
1 parent beb58a4 commit 9924553
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DiscordBot/Utils/ProfanityDetector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static void GetContainedWordsCountAndWeight(ReadOnlySpan<char> lowerCase
}

private readonly record struct WordRange(int Start, int End);
private static readonly SearchValues<char> _seperationValues = SearchValues.Create([' ', '\t', '\r', '\n', '?', '!', ',', '.']);
private static readonly SearchValues<char> _seperationValues = SearchValues.Create([' ', '\t', '\r', '\n', '?', '!', ',', '.', '(', ')']);
private static List<WordRange> GetWordRanges(ReadOnlySpan<char> span)
{
List<WordRange> wordRanges = [];
Expand Down

0 comments on commit 9924553

Please sign in to comment.