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

Family name missing on first record if it exists only after a separator #38

Open
joeyparis opened this issue Jan 27, 2021 · 2 comments
Open

Comments

@joeyparis
Copy link

Input

Namae.parse('Larry and Irene Smeltzer')

Expected Output:

# => [#<Name family="Smeltzer" given="Larry">, #<Name family="Smeltzer" given="Irene">]

Actual Output:

#=> [#<Name given="Larry">, #<Name family="Smeltzer" given="Irene">]

Proposed Solution:
If two names are separated by and or & (probably not ;), and one of the two names does not have a family name it should inherit the family name of the other record. I'm going to attempt to solve this myself but the autogenerated racc file is a little intimidating.

@inukshuk
Copy link
Member

We would most certainly need to add a configuration option for this, because and, & and similar conjunctions are frequently used in regular name lists. And don't worry, the auto-generated file should not be changed, instead you make the changes to the source file and then run the racc rake task.

@joeyparis
Copy link
Author

Sorry, I meant to say the source file to generate the racc file is intimidating (but I guess not as much as the actual generated file 😂). I've started to read up on racc so hopefully I'll be able to contribute to this soon!

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

No branches or pull requests

2 participants