Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for numbers with thousand spaces (12 345 678) and numbers… #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

HaramanJohal
Copy link

… without spaces before metric units (12.3million), add more common abbreviations for million and billion, some small style changes

Hi frootbirb 👋🏾

Your recent PR to w2n has some great improvements, thanks for making that PR!

As that's the version of the repo I'll be using myself I also had a go at fixing some other number types I might be encountering and I've PRed them here in case anyone else is interested. The tests (including some new ones I've added) seem to pass and I'm happy to discuss the code or follow up on suggestions

… without spaces before metric units (12.3million), add more common abbreviations for million and billion
Copy link
Owner

@frootbirb frootbirb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One point of concern - will this handle lists of numbers properly? I'm a little concerned about e.g. "It could be one of 133, 145, or 154". It seems to me that the regex will combine 133 and 145, since it'll ignore "," and then the new regex will join the two three-digit sections. I'm not convinced that that's necessarily a problem, but it should definitely be clearly marked.

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

Successfully merging this pull request may close these issues.

2 participants