Open jmaicher opened 3 years ago
Hi,
Thanks for filing this issue. I agree it makes sense to remove the quotes from the compact
part :+1:. If you can submit a PR, it will be much appreciated. Thanks
Globalize("de").formatNumberToParts(1_000_000, { compact: "short" });
// > [
// { type: 'integer', value: '1' },
// { type: 'literal', value: ' ' },
// { type: 'compact', value: "Mio'.'" }
// ]
Hey :wave:
As you can see in the following example, literal quotes are not fully removed from compact number/currency formats.
This is a regression that was introduced in 1.5.0 with this commit 8b2a006.
What would be a good approach to fix this? Does it make sense to remove literal quotes specifically from the
compact
part, or do we need to take more parts into consideration? Literal quotes are already partially removed instringToParts
.