wmllint: recognize amendment tags to avoid a crash
In certain situations, the 'directly_in_event' list was allowed to become empty and cause a crahs because the code was unable to handle amendment tags.
This commit is contained in:
parent
6b5da2a1a2
commit
a364dfd669
1 changed files with 2 additions and 2 deletions
|
@ -1891,9 +1891,9 @@ to be called on their own".format(filename, num))
|
|||
subtag_depth += 1
|
||||
if "[/" in lines[i]:
|
||||
subtag_depth -= 1
|
||||
if "[event]" in lines[i]:
|
||||
if "[event]" in lines[i] or "[+event]" in lines[i]:
|
||||
directly_in_event.append(True)
|
||||
elif re.search(r"\[[a-z]", lines[i]):
|
||||
elif re.search(r"\[\+?[a-z]", lines[i]):
|
||||
directly_in_event.append(False)
|
||||
elif "[/" in lines[i]:
|
||||
if len(directly_in_event) > 0:
|
||||
|
|
Loading…
Add table
Reference in a new issue