Skip to content

Commit

Permalink
Also highlight subsequent instances of a word
Browse files Browse the repository at this point in the history
  • Loading branch information
enteryournamehere committed Aug 20, 2023
1 parent 10c52a7 commit 4a4561a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Uchu.World/Social/Whitelist.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void AddWord(string word)
if (allowed) continue;

// Add the bad word's position and length.
var position = (byte) phrase.IndexOf(word, StringComparison.Ordinal);
var position = (byte) (phrase.Substring(match.Index).IndexOf(word, StringComparison.Ordinal) + match.Index);
redact.Add((position, (byte) word.Length));
}

Expand Down

0 comments on commit 4a4561a

Please sign in to comment.