2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-06-06 04:10:52 +00:00

Fix regex used for finding classes in the library

This commit is contained in:
Jay Berkenbilt 2022-07-24 15:41:02 -04:00
parent d27edd54c4
commit 3661f2749a

View File

@ -111,7 +111,9 @@ class Main:
classes = set() classes = set()
for i in sorted(lib): for i in sorted(lib):
# Find a symbol that looks like a class method. # Find a symbol that looks like a class method.
m = re.match(r'(((?:^\S*?::)?(?:[^:\s]+))::([^:\s]+))\(', i) m = re.match(
r'(((?:^\S*?::)?(?:[^:\s]+))::([^:\s]+))(?:\[[^\]]+\])?\(',
i)
if m: if m:
full = m.group(1) full = m.group(1)
clas = m.group(2) clas = m.group(2)