Skip to content

Conversation

movermeyer-stripe
Copy link
Contributor

What are you trying to accomplish?

The code was not accounting for the possibility of string literals in compact patterns (example).

This was causing issues with the compact rendering of numbers in some languages.

What approach did you choose and why?

Copied the same regex for detecting literals in the stringToParts function, and applied it to compactPattern.

What should reviewers focus on?

That the regex makes sense.

It's safe to add the ' to the negated character class, since a ' is either the start of a string literal or should be escaped with a second ', both of which are covered by the first case in the alternation.

The impact of these changes

Fixes #917
Fixes #946

Copy link

linux-foundation-easycla bot commented Sep 26, 2025

CLA Signed

  • ✅login: movermeyer-stripe / name: Michael Overmeyer / (8aa4b7a)

The committers listed above are authorized under a signed CLA.

@rxaviers rxaviers merged commit f34a23e into globalizejs:master Sep 29, 2025
1 check passed
@rxaviers
Copy link
Member

Released 1.7.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants