wmllint: removed gif from two regexps

This commit is contained in:
Elvish_Hunter 2022-05-01 11:21:00 +02:00
parent 8af84a1093
commit b23cccc23d

View file

@ -2393,8 +2393,8 @@ def hack_syntax(filename, lines):
precomment = re.split(r'\s#', lines[i], 1)[0]
comment = lines[i][len(precomment):]
if '\\' in precomment:
while re.search(r'(?<!\\)\\(?!\\)[^ ={}"]+\.(png|ogg|wav|gif|jpe?g|map|mask|cfg)\b', precomment, flags=re.IGNORECASE):
backslash = re.search(r'([^ ={}"]*(?<!\\)\\(?!\\)[^ ={}"]+\.)(png|ogg|wav|gif|jpe?g|map|mask|cfg)(?=\b)', precomment, flags=re.IGNORECASE)
while re.search(r'(?<!\\)\\(?!\\)[^ ={}"]+\.(png|ogg|wav|jpe?g|map|mask|cfg)\b', precomment, flags=re.IGNORECASE):
backslash = re.search(r'([^ ={}"]*(?<!\\)\\(?!\\)[^ ={}"]+\.)(png|ogg|wav|jpe?g|map|mask|cfg)(?=\b)', precomment, flags=re.IGNORECASE)
fronted = backslash.group(1).replace("\\","/") + backslash.group(2)
precomment = precomment[:backslash.start()] + fronted + precomment[backslash.end():]
print('"%s", line %d: %s -> %s -- please use frontslash (/) for cross-platform compatibility' \