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

Prevent false nicknames due to multiple quotes #86

Merged
merged 1 commit into from
Jun 27, 2019
Merged

Prevent false nicknames due to multiple quotes #86

merged 1 commit into from
Jun 27, 2019

Conversation

vaneseltine
Copy link
Contributor

Certain Anglicized names such as those from some Hawaiian, Samoan,
and Kenyan traditions, include multiple single quotation marks.
This adjusts the quoted_word regex to only capture single quote
marks that are not inside words. Without this fix, false nicknames
are extracted from inside names like Ng'ang'a and Kawai'ae'a.
Tests are included to cover; existing Benjamin 'Ben' Franklin test
assures that the typical nickname case is unchanged.

Certain Anglicized names such as those from some Hawaiian, Samoan,
and Kenyan traditions, include multiple single quotation marks.
This adjusts the quoted_word regex to only capture single quote
marks that are not inside words. Without this fix, false nicknames
are extracted from inside names like Ng'ang'a and Kawai'ae'a.
Tests are included to cover; existing Benjamin 'Ben' Franklin test
assures that the typical nickname case is unchanged.
@derek73 derek73 merged commit e75cb81 into derek73:master Jun 27, 2019
@derek73 derek73 added this to the v1.0.4 milestone Jun 27, 2019
@derek73 derek73 added the bug label Jun 27, 2019
@derek73
Copy link
Owner

derek73 commented Jun 27, 2019

Thanks for the great pull request. I knew this wasn't quite right but didn't know how to fix it. My regex mojo is pretty weak. I appreciate the help.

@vaneseltine
Copy link
Contributor Author

Happy to help, and thank you for building and maintaining nameparser. I'm getting good use out of it.

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

Successfully merging this pull request may close these issues.

None yet

2 participants