File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed
Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Release Log
22===========
33* 0.4.1 - July 25, 2016
44 - Remove "bishop" from titles because it also could be a first name
5+ - Fix handling of lastname prefixes with periods, e.g. "Jane St. John" (#50)
56* 0.4.0 - June 2, 2016
67 - Remove "CONSTANTS.suffixes", replaced by "suffix_acronyms" and "suffix_not_acronyms" (#49)
78 - Add "du" to prefixes
Original file line number Diff line number Diff line change @@ -274,8 +274,8 @@ def is_conjunction(self, piece):
274274 return piece .lower () in self .C .conjunctions and not self .is_an_initial (piece )
275275
276276 def is_prefix (self , piece ):
277- """Is in the prefixes set and not :py:func:`is_an_initial()` ."""
278- return piece . lower ( ) in self .C .prefixes and not self . is_an_initial ( piece )
277+ """Lowercase and no periods version of piece is in the `~nameparser.config.titles.PREFIXES` set ."""
278+ return lc ( piece ) in self .C .prefixes
279279
280280 def is_roman_numeral (self , value ):
281281 """
Original file line number Diff line number Diff line change @@ -1378,6 +1378,11 @@ def test_prefix(self):
13781378 self .m (hn .first , "Juan" , hn )
13791379 self .m (hn .last , "del Sur" , hn )
13801380
1381+ def test_prefix_with_period (self ):
1382+ hn = HumanName ("Jill St. John" )
1383+ self .m (hn .first , "Jill" , hn )
1384+ self .m (hn .last , "St. John" , hn )
1385+
13811386 def test_prefix_before_two_part_last_name (self ):
13821387 hn = HumanName ("pennie von bergen wessels" )
13831388 self .m (hn .first , "pennie" , hn )
You can’t perform that action at this time.
0 commit comments