mirror of
https://github.com/RPCS3/discord-bot.git
synced 2025-01-31 23:42:07 +00:00
fix tests
This commit is contained in:
parent
3d03f88f59
commit
53599bda93
@ -70,10 +70,10 @@ namespace CompatBot.EventHandlers
|
||||
public static bool NeedsRename(string displayName)
|
||||
{
|
||||
displayName = displayName?.Normalize().TrimEager();
|
||||
return displayName != StripZalgo(displayName);
|
||||
return displayName != StripZalgo(displayName, 3);
|
||||
}
|
||||
|
||||
public static string StripZalgo(string displayName)
|
||||
public static string StripZalgo(string displayName, int level = 2)
|
||||
{
|
||||
displayName = displayName?.Normalize().TrimEager();
|
||||
if (string.IsNullOrEmpty(displayName))
|
||||
@ -88,7 +88,7 @@ namespace CompatBot.EventHandlers
|
||||
{
|
||||
case UnicodeCategory.ModifierSymbol:
|
||||
case UnicodeCategory.NonSpacingMark:
|
||||
if (++consecutive < 2)
|
||||
if (++consecutive < level)
|
||||
builder.Append(c);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user