Fix capital letters in compound names
This commit is contained in:
parent
8d31594946
commit
6b38abe6f4
1 changed files with 3 additions and 2 deletions
|
@ -103,8 +103,9 @@ class Config:
|
||||||
# Normalize
|
# Normalize
|
||||||
def normalize(x: str) -> str:
|
def normalize(x: str) -> str:
|
||||||
x = x.strip()
|
x = x.strip()
|
||||||
if " " in x:
|
for sep in (" ", "-"):
|
||||||
return " ".join(map(normalize, x.split()))
|
if sep in x:
|
||||||
|
return sep.join(map(normalize, x.split(sep)))
|
||||||
return x[0].upper() + x[1:].lower()
|
return x[0].upper() + x[1:].lower()
|
||||||
|
|
||||||
for pers in raw_people:
|
for pers in raw_people:
|
||||||
|
|
Loading…
Reference in a new issue