Skip to content

Commit

Permalink
wmllint-1.4: renamed two variables
Browse files Browse the repository at this point in the history
Used 'r' instead of 'm' if the code refers to ranged attacks (instead of melee); also, ensure that the regexps check the modified versions of the line.
  • Loading branch information
Elvish-Hunter committed Sep 16, 2015
1 parent 3afe74b commit 53ee364
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions data/tools/wmllint-1.4
Expand Up @@ -1610,15 +1610,15 @@ start_time=-150
for i, line in enumerate(lines):
if "no-syntax-rewrite" in line:
break
m = re.search(r"(\s+)image_short=(.*)", line)
m = re.search(r"(\s+)image_short=(.*)", lines[i])
if m:
image_block = expanded.replace("\n", "\n" + m.group(1)) + "\n"
lines[i] = m.group(1) + image_block % (m.group(2), "melee")
modcount += 1
m = re.search(r"(\s+)image_long=(.*)", line)
if m:
image_block = expanded.replace("\n", "\n" + m.group(1)) + "\n"
lines[i] = m.group(1) + image_block % (m.group(2), "ranged")
r = re.search(r"(\s+)image_long=(.*)", lines[i])
if r:
image_block = expanded.replace("\n", "\n" + r.group(1)) + "\n"
lines[i] = r.group(1) + image_block % (r.group(2), "ranged")
modcount += 1
# In [terrain], letter= to terrain=
in_terrain = False
Expand Down

0 comments on commit 53ee364

Please sign in to comment.