Skip to content

Commit d6efe1f

Browse files
committed
Fixed a bug in the name_parts() function when dealing with names listing uppercased surname first, followed by given name.
- Legacy-Id: 18596
1 parent 86f495b commit d6efe1f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/person/name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def name_parts(name):
5959
last = parts[0]
6060
if len(parts) >= 2:
6161
# Handle reverse-order names with uppercase surname correctly
62-
if re.search("^[A-Z-]+$", first):
62+
if len(first)>1 and re.search("^[A-Z-]+$", first):
6363
first, last = last, first.capitalize()
6464
# Handle exception for RFC Editor
6565
if (prefix, first, middle, last, suffix) == ('', 'Editor', '', 'Rfc', ''):

0 commit comments

Comments
 (0)