Skip to content

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

Open
HaramanJohal wants to merge 1 commit into
frootbirb:masterfrom
HaramanJohal:master
Open

add support for numbers with thousand spaces (12 345 678) and numbers…#1
HaramanJohal wants to merge 1 commit into
frootbirb:masterfrom
HaramanJohal:master

Conversation

@HaramanJohal
Copy link
Copy Markdown

… 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
Copy Markdown
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