mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
Fixed bug with ,2 reading as 2 instead of .2
This commit is contained in:
parent
e6b6dc8707
commit
5e04c23e1e
@ -135,13 +135,10 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
{
|
||||
if (!string.IsNullOrEmpty(token))
|
||||
{
|
||||
if (char.IsDigit(token[0]))
|
||||
{
|
||||
var separatorRegex = new Regex(@"[^\d](?=.*[^\d])");
|
||||
token_bis = separatorRegex.Replace(token, string.Empty);
|
||||
var separatorRegex2 = new Regex(@"[^\d]");
|
||||
token_bis = separatorRegex2.Replace(token_bis, cultureFrom.NumberFormat.NumberDecimalSeparator);
|
||||
}
|
||||
var separatorRegex = new Regex(@"[^\d](?=.*[^\d])");
|
||||
token_bis = separatorRegex.Replace(token, string.Empty);
|
||||
var separatorRegex2 = new Regex(@"[^\d]");
|
||||
token_bis = separatorRegex2.Replace(token_bis, cultureFrom.NumberFormat.NumberDecimalSeparator);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user