wmllint: Exclude preprocessor directives from [part] children check
This solves spurious errors when attempting to use #ifdef within [part].
This commit is contained in:
parent
4e5ebba351
commit
96be3ead4c
1 changed files with 1 additions and 1 deletions
|
@ -845,7 +845,7 @@ def local_sanity_check(filename, nav, key, prefix, value, comment):
|
|||
if m and not m.group(1):
|
||||
print errlead + 'translatability mark before non-string'
|
||||
# Most tags are not allowed with [part]
|
||||
if "[part]" in ancestors and parent not in ("[part]", "[image]", "[insert_tag]", "[if]", "[then]", "[else]", "[switch]", "[case]", "[variable]", "[deprecated_message]"):
|
||||
if "[part]" in ancestors and parent not in ("[part]", "[image]", "[insert_tag]", "[if]", "[then]", "[else]", "[switch]", "[case]", "[variable]", "[deprecated_message]") and not parent.startswith("#"):
|
||||
print errlead + '%s not permitted within [part] tag' % parent
|
||||
# Most tags are not permitted inside [if]
|
||||
if len(ancestors) >= 2 and ancestors[-1] == "[if]":
|
||||
|
|
Loading…
Add table
Reference in a new issue