wmllint: fixed a regex that didn't match augmentation tags

(cherry-picked from commit cc178ad474)
This commit is contained in:
Elvish_Hunter 2018-08-09 19:57:52 +02:00
parent 8b32f89a1f
commit 4b81eb5081

View file

@ -1719,7 +1719,9 @@ def global_sanity_check(filename, lines):
elif "[/multiplayer]" in lines[i]:
in_multiplayer = False
else:
if re.search(r"\[[a-z]", lines[i]):
# the + check is needed for augmentation tags
# otherwise subtag_depth may become negative
if re.search(r"\[\+?[a-z]", lines[i]):
subtag_depth += 1
if "[/" in lines[i]:
subtag_depth -= 1