[PTRun][WebSearch] Enable analyzer and fix warnings (#16938)

This commit is contained in:
CleanCodeDeveloper
2022-03-10 11:35:49 +01:00
committed by GitHub
parent 3b04cfd267
commit ffdb5d44d7
2 changed files with 3 additions and 1 deletions

View File

@@ -152,7 +152,7 @@ namespace Community.PowerToys.Run.Plugin.WebSearch
{
if (input.EndsWith(":", StringComparison.OrdinalIgnoreCase)
&& !input.StartsWith("http", StringComparison.OrdinalIgnoreCase)
&& !input.Contains("/", StringComparison.OrdinalIgnoreCase)
&& !input.Contains('/', StringComparison.OrdinalIgnoreCase)
&& !input.All(char.IsDigit)
&& System.Text.RegularExpressions.Regex.IsMatch(input, @"^([a-z][a-z0-9+\-.]*):"))
{