fix: add exception to last<->first name swap (#8043)
This commit is contained in:
parent
148fa2f9f6
commit
83f5fc8d1a
|
@ -59,7 +59,7 @@ def name_parts(name):
|
||||||
last = parts[0]
|
last = parts[0]
|
||||||
if len(parts) >= 2:
|
if len(parts) >= 2:
|
||||||
# Handle reverse-order names with uppercase surname correctly
|
# Handle reverse-order names with uppercase surname correctly
|
||||||
if len(first)>1 and re.search("^[A-Z-]+$", first):
|
if len(first)>1 and re.search("^[A-Z-]+$", first) and first != "JP":
|
||||||
first, last = last, first.capitalize()
|
first, last = last, first.capitalize()
|
||||||
# Handle exception for RFC Editor
|
# Handle exception for RFC Editor
|
||||||
if (prefix, first, middle, last, suffix) == ('', 'Editor', '', 'Rfc', ''):
|
if (prefix, first, middle, last, suffix) == ('', 'Editor', '', 'Rfc', ''):
|
||||||
|
|
Loading…
Reference in a new issue