Introduce wildcarding for @R0 and @V.

This commit is contained in:
Eric S. Raymond 2010-09-23 12:29:11 +00:00
parent 3428df86d9
commit d2c826c9f0

View file

@ -645,11 +645,11 @@ class CrossRef:
if name in self.fileref and self.visible_from(name, fn, n):
self.fileref[name].append(fn, n+1)
continue
# If the name contains subtitutable parts, count
# If the name contains substitutable parts, count
# it as a reference to everything the substitutions
# could potentially match.
elif '{' in name:
pattern = re.sub(r"\{[^}]*\}", '.*', name)
elif '{' in name or '@' in name:
pattern = re.sub(r"(\{[^}]*\}|@R0|@V)", '.*', name)
key = self.mark_matching_resources(pattern, fn,n+1)
if key:
self.fileref[key].append(fn, n+1)