diff options
-rwxr-xr-x | deheader | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1150,7 +1150,9 @@ class InclusionMap: compiled = [] for (r, h) in requirements: if r.endswith("()"): - c = re.compile(r"\W" + r.replace("()", r"\s*\(")) + # The prefix is intended to exclude false suffix matches: + # also, excluding : prevents matching on C++ method names. + c = re.compile(r"[^a-zA-Z0-9:_]" + r.replace("()", r"\s*\(")) else: c = re.compile(r) compiled.append((r, c, h)) |