wmllint: make the 'ignore' magic comment actually work in certain situations

Fixes #8182
This commit is contained in:
Elvish_Hunter 2024-01-26 21:31:39 +01:00
parent 8f01f11065
commit 1c9274faea

View file

@ -3629,6 +3629,11 @@ directory.""")
line = line.replace("[unit]", "[unit_type]")
line = line.replace("[+unit]", "[+unit_type]")
line = line.replace("[/unit]", "[/unit_type]")
# putting the ignore check here to allow setting the post15 flag
if "wmllint: ignore" in original:
return original
# Handle SingleUnitWML or Standard Unit Filter or SideWML
# Also, when macro calls have description= in them, the arg is
# a SUF being passed in.