Skip to content

Country regex update #1392

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

Merged
merged 3 commits into from
Feb 21, 2017
Merged

Country regex update #1392

merged 3 commits into from
Feb 21, 2017

Conversation

etpinard
Copy link
Contributor

fixes #1381

cc @chriddyp

@etpinard etpinard added status: reviewable bug something broken labels Feb 17, 2017
@etpinard etpinard added this to the 1.24.0 milestone Feb 17, 2017
@@ -53,7 +53,7 @@
"alpha-shape": "^1.0.0",
"arraytools": "^1.0.0",
"convex-hull": "^1.0.3",
"country-regex": "^1.0.0",
"country-regex": "^1.1.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -51,7 +51,7 @@ function countryNameToISO3(countryName) {
var iso3 = countryIds[i],
regex = new RegExp(countryRegex[iso3]);

if(regex.test(countryName.toLowerCase())) return iso3;
if(regex.test(countryName.trim().toLowerCase())) return iso3;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@chriddyp
Copy link
Member

woohoo! 💃

@etpinard etpinard merged commit 143749e into master Feb 21, 2017
@etpinard etpinard deleted the country-regex-update branch February 21, 2017 14:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Virgin Islands (U.S.) overwrites United States in choropleth
2 participants