Skip to content

run the parsing of pieces for post-comma parts prior to checking if a… #98

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

Conversation

rAndrewNichol
Copy link
Contributor

…ll post-comma elements are suffixes. this ensures that suffixes are properly captured in the constants prior to the all-suffix check.

This is to fix an inconsistency issue where a name would get misparsed the first time it was parsed and correctly parsed any subsequent times.

Upstream:

HumanName("David Roth, M.Ed")
<HumanName : [
title: ''
first: 'M.Ed'
middle: ''
last: 'David Roth'
suffix: ''
nickname: ''
]>
HumanName("David Roth, M.Ed")
<HumanName : [
title: ''
first: 'David'
middle: ''
last: 'Roth'
suffix: 'M.Ed'
nickname: ''
]>

With Fix:

HumanName("David Roth, M.Ed")
<HumanName : [
title: ''
first: 'David'
middle: ''
last: 'Roth'
suffix: 'M.Ed'
nickname: ''
]>
HumanName("David Roth, M.Ed")
<HumanName : [
title: ''
first: 'David'
middle: ''
last: 'Roth'
suffix: 'M.Ed'
nickname: ''
]>

Tests were identical to upstream, 11 expected failures.

…ll post-comma elements are suffixes. this ensures that suffixes are properly captured in the constants prior to the all-suffix check
@rAndrewNichol
Copy link
Contributor Author

Hi @derek73 - any interest in this PR? any followup from me you'd like?

@derek73
Copy link
Owner

derek73 commented Nov 20, 2019 via email

@derek73 derek73 merged commit 5d74f04 into derek73:master Dec 12, 2019
@derek73
Copy link
Owner

derek73 commented Dec 12, 2019

Thanks for the pull request. Looks like you had to go pretty far down the rabbit hole to unravel that one. :) I appreciate it. Sorry it took so long to get this merged.

@derek73 derek73 added this to the v1.0.5 milestone Dec 12, 2019
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