sacrifice up to 25% performance to clean up more garbage

This commit is contained in:
13xforever 2019-11-29 19:42:06 +05:00
parent c96c1c1673
commit 49390751f0

View File

@ -45,7 +45,7 @@ namespace CompatBot.Database.Providers
if (result is null && ctx == FilterContext.Chat)
{
str = str.ToCanonicalForm();
str = str.StripInvisible().ToCanonicalForm();
matcher?.ParseText(str, h =>
{
if (string.IsNullOrEmpty(h.Value.ValidatingRegex) || Regex.IsMatch(str, h.Value.ValidatingRegex, RegexOptions.IgnoreCase | RegexOptions.Multiline))