mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-03 03:19:08 +08:00
[PT Run - Calculator plugin] Normalize input before processing (#15131)
This commit is contained in:
parent
81e0e14008
commit
09e188621c
@ -5,6 +5,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Text;
|
||||
using ManagedCommon;
|
||||
using Wox.Plugin;
|
||||
using Wox.Plugin.Logger;
|
||||
@ -33,7 +34,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
}
|
||||
|
||||
NumberTranslator translator = NumberTranslator.Create(CultureInfo.CurrentCulture, new CultureInfo("en-US"));
|
||||
var input = translator.Translate(query.Search);
|
||||
var input = translator.Translate(query.Search.Normalize(NormalizationForm.FormKC));
|
||||
|
||||
if (!CalculateHelper.InputValid(input))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user