[PT Run - Calculator plugin] Allow single-digit factorial (#14736)

This commit is contained in:
Stefan Markovic
2021-12-02 15:07:47 +01:00
committed by GitHub
parent a018e0493b
commit c95fb78cf4

View File

@@ -28,7 +28,8 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
throw new ArgumentNullException(paramName: nameof(input)); throw new ArgumentNullException(paramName: nameof(input));
} }
if (input.Length <= 2) bool singleDigitFactorial = input.EndsWith("!", StringComparison.InvariantCulture);
if (input.Length <= 2 && !singleDigitFactorial)
{ {
return false; return false;
} }