Drop exponent suggestion when 0
This commit changes numeric literal formatting to drop exponent when exponent is 0.
This commit is contained in:
parent
b9dedf3959
commit
42f2304ce4
@ -157,8 +157,10 @@ impl<'a> NumericLiteral<'a> {
|
||||
}
|
||||
|
||||
if let Some((separator, exponent)) = self.exponent {
|
||||
output.push_str(separator);
|
||||
Self::group_digits(&mut output, exponent, group_size, true, false);
|
||||
if exponent != "0" {
|
||||
output.push_str(separator);
|
||||
Self::group_digits(&mut output, exponent, group_size, true, false);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(suffix) = self.suffix {
|
||||
|
Loading…
x
Reference in New Issue
Block a user