From 4b81eb508163945d561969ef0245a330b2765e6a Mon Sep 17 00:00:00 2001 From: Elvish_Hunter Date: Thu, 9 Aug 2018 19:57:52 +0200 Subject: [PATCH] wmllint: fixed a regex that didn't match augmentation tags (cherry-picked from commit cc178ad4742472397685a39e93074139225767f1) --- data/tools/wmllint | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/data/tools/wmllint b/data/tools/wmllint index 6120515d91c2..dff461b202b2 100755 --- a/data/tools/wmllint +++ b/data/tools/wmllint @@ -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