From: Fred Drake Date: Wed, 24 Feb 1999 18:39:47 +0000 (+0000) Subject: ignore_from_idx(): Fixed bug in regular expression. X-Git-Tag: v1.5.2c1~254 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=093c97a36f92d0cb24a8ae9930ba9f93b4f2be06;p=thirdparty%2FPython%2Fcpython.git ignore_from_idx(): Fixed bug in regular expression. --- diff --git a/Doc/tools/listmodules b/Doc/tools/listmodules index b00019982dc2..e0c4fc600e78 100755 --- a/Doc/tools/listmodules +++ b/Doc/tools/listmodules @@ -66,7 +66,7 @@ def main(): if data[:1] == "\\": ignore_from_idx(data, ignore_dict) else: - ignore_from_filelist(data, ignore_dict) + ignore_from_modulelist(data, ignore_dict) if args or (annotate and categorize): usage() sys.exit(2) @@ -135,13 +135,13 @@ def main(): print string.join(modules, "\n") -def ignore_from_filelist(data, ignore_dict): +def ignore_from_modulelist(data, ignore_dict): for name in string.split(data): ignore_dict[name] = name def ignore_from_idx(data, ignore_dict): data = string.replace(data, r"\hackscore {}", "_") - rx = re.compile(r"\indexentry {([^@]*)@") + rx = re.compile(r"\\indexentry\s*{([^@]*)@") for line in string.split(data, "\n"): m = rx.match(line) if m: