Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Prevent false nicknames due to multiple quotes#86

Merged
derek73 merged 1 commit intoderek73:masterfrom
vaneseltine:improve-single-quote-handling
Jun 27, 2019
Merged

Prevent false nicknames due to multiple quotes#86
derek73 merged 1 commit intoderek73:masterfrom
vaneseltine:improve-single-quote-handling

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.

2 participants