Skip to content

Commit

Permalink
Merge pull request #465 from PokeAPI/ability-prose-inconsistency
Browse files Browse the repository at this point in the history
Fix scrubbing for rare cases
  • Loading branch information
Naramsim authored Feb 23, 2020
2 parents 8f64fa0 + dec2779 commit 3ee375d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion data/v2/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3ee375d

Please sign in to comment.