Skip to content

Running capitalize on a name with multiple suffixes introduces an extra comma #14

Description

@arusahni

If I have a name in the format last_name, first_name suffix-list, for example: SAHNI, ARU MD PHD, nameparser produces the following:

<HumanName : [
    Title: ''
    First: 'ARU'
    Middle: ''
    Last: 'SAHNI'
    Suffix: 'MD, PHD'
    Nickname: ''
]>

If I then run capitalize on the name, I get:

<HumanName : [
    Title: ''
    First: 'Aru'
    Middle: ''
    Last: 'Sahni'
    Suffix: 'Md,, Phd'
    Nickname: ''
]>

Notice the extra comma after the "Md" title. This seems to be due to the fact that the suffix_list is being concatenated with a comma, but being split on whitespace in the capitalize function. I'll submit a pull-request for this shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions