modify currency regexes to handle decimal points #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For original issue ticket see: #39
I decided to leave out the zero omission, as I couldn't come up with any programming languages which would output floats as so. There was also a typo in comments on line 117, which I fixed. I also added all current currencies to the suffixed regex, even though only euros are actually typed so. We in Europe tend to many times forget that US dollars are prefixed with the sign.
Since there were no tests, I used http://regex101.com to come up with inputs of my own. So far, I haven't come up with any inputs which would result in bad data, although the third regex (on line 118) parses numbers such as 111.111.111 as valid. I don't really see a case where this would happen, but in case you see this as something you want sorted out, I could take a look at it. I don't just see it to affect this particular PR, so I'll let it untouched for now.
Also,
grunt
updated the version into1.6.4
, but seemingly thepackage.json
already has that, so I guess you know what is going on. That being said, the primary Github branch is also calledgh-pages
.