skip further operations if the value is zero-length
This came to my attention because of a Dark Elves scenario with a 'description=' key that was left blank for the value, crashing wmllint with an index error. More broadly, however, the operations in this section are pointless when there is no value.
This commit is contained in:
parent
79b8a85a5e
commit
5af7601abd
1 changed files with 2 additions and 0 deletions
|
@ -826,6 +826,8 @@ def sanity_check(filename, lines):
|
|||
(key, prefix, value, comment) = parse_attribute(lines[i])
|
||||
if "wmllint: ignore" in comment:
|
||||
continue
|
||||
if len(value) == 0:
|
||||
continue
|
||||
has_tr_mark = value.lstrip().startswith("_")
|
||||
if key == 'role':
|
||||
present.append(value)
|
||||
|
|
Loading…
Add table
Reference in a new issue