fix: add exception to last<->first name swap (#8043)

This commit is contained in:
Robert Sparks 2024-10-11 12:24:35 -05:00 committed by GitHub
parent 148fa2f9f6
commit 83f5fc8d1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -59,7 +59,7 @@ def name_parts(name):
last = parts[0]
if len(parts) >= 2:
# 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()
# Handle exception for RFC Editor
if (prefix, first, middle, last, suffix) == ('', 'Editor', '', 'Rfc', ''):