wmllint: Ignore notes when checking for shroud and fog
The following line was causing a wmllint error because it contains _s: Irs, book_start Icr^Ii, Irs "../../data/campaigns/Descent_Into_Darkness/maps/07c_A_Small_Favor3.map", line 10: warning, fog or shroud in map file
This commit is contained in:
parent
bbf3840f82
commit
5735a16abf
1 changed files with 6 additions and 4 deletions
|
@ -2871,10 +2871,12 @@ def translator(filename, mapxforms, textxform):
|
|||
else:
|
||||
fields = [x for x in line]
|
||||
outmap.append(fields)
|
||||
if not maskwarn and maptype == 'map' and re.search('_s|_f(?!me)', line):
|
||||
print('"%s", line %d: warning, fog or shroud in map file' \
|
||||
% (filename, lineno+1))
|
||||
maskwarn = True
|
||||
terrain_strings = (f.split()[-1] for f in fields)
|
||||
if not maskwarn and maptype == 'map':
|
||||
if any(re.search('_s|_f(?!me)', t) for t in terrain_strings):
|
||||
print('"%s", line %d: warning, fog or shroud in map file' \
|
||||
% (filename, lineno+1))
|
||||
maskwarn = True
|
||||
# Deduce the map type
|
||||
if not map_only:
|
||||
if maptype == "map":
|
||||
|
|
Loading…
Add table
Reference in a new issue