2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 10:58:58 +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()
for i in sorted(lib):
# 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:
full = m.group(1)
clas = m.group(2)