wmlscope: fixed a bug that caused UMC map paths to not be found

Due to the new regex used, the tilde before UMC paths was now collected but never removed from the paths.
This commit is contained in:
Elvish_Hunter 2017-11-01 10:59:21 +01:00
parent 6163285ae0
commit fca4795f30

View file

@ -778,8 +778,11 @@ class CrossRef:
for pattern in split_filenames(match):
for name in expand_square_braces(pattern):
# Catches maps that look like macro names.
if (name.endswith(".map") or name.endswith(".mask")) and name[0] == '{':
name = name[1:]
if (name.endswith(".map") or name.endswith(".mask")):
if name.startswith("{~"):
name = name[2:]
elif name.startswith("{"):
name = name[1:]
if os.sep == "\\":
name = name.replace("/", "\\")
key = None