mirror of
https://github.com/PokeAPI/pokeapi
synced 2024-11-25 12:50:18 +00:00
Merge pull request #465 from PokeAPI/ability-prose-inconsistency
Fix scrubbing for rare cases
This commit is contained in:
commit
3ee375d490
1 changed files with 5 additions and 1 deletions
|
@ -118,7 +118,11 @@ def scrub_str(string):
|
|||
if group[0]:
|
||||
sub = group[0]
|
||||
else:
|
||||
sub = group[1].split(":")[1]
|
||||
sub = group[1].split(":")
|
||||
if len(sub) >= 2:
|
||||
sub = sub[1]
|
||||
else:
|
||||
sub = sub[0]
|
||||
sub = sub.replace("-", " ")
|
||||
string = re.sub(SUB_RGX, sub, string, 1)
|
||||
return string
|
||||
|
|
Loading…
Reference in a new issue