Skip to content

Commit 6578a06

Browse files
committed
Fix issue with multiple suffixes and capitalization
As mentioned in #14, when the nameparser is passed a name like "SAHNI, ARU MD PHD", the suffix property is joined by a comma and a space. When `capitalize()` is called, the `HumanName.suffix` property is only split on space, resulting in trailing commas in the first n-1 `suffix_list` entries. fixes #14
1 parent 2f2cff0 commit 6578a06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

nameparser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,4 +620,4 @@ def capitalize(self):
620620
self.first_list = self.cap_piece(self.first ).split(' ')
621621
self.middle_list = self.cap_piece(self.middle).split(' ')
622622
self.last_list = self.cap_piece(self.last ).split(' ')
623-
self.suffix_list = self.cap_piece(self.suffix).split(' ')
623+
self.suffix_list = self.cap_piece(self.suffix).split(', ')

0 commit comments

Comments
 (0)