Small tweak to macro use detector,

...will avoid spurious matches on filemanes containing . and lead with
capital letter.
This commit is contained in:
Eric S. Raymond 2008-01-28 19:59:59 +00:00
parent 4091dfa9b3
commit dc35a4411c

View file

@ -93,7 +93,7 @@ class Reference:
__repr__ = __str__
class CrossRef:
macro_reference = re.compile(r"\{([A-Z_][A-Z0-9_:]*[A-Za-z0-9_])\b")
macro_reference = re.compile(r"\{([A-Z_][A-Z0-9_:]*[A-Za-z0-9_])(?!\.)\b")
file_reference = re.compile(r"[A-Za-z0-9{}.][A-Za-z0-9_/+{}.-]*\.(" + "|".join(resource_extensions) + ")")
def mark_matching_resources(self, pattern, fn, n):
"Mark all definitions matching a specified pattern with a reference."