Skip to content

Commit a8fcfd1

Browse files
authored
Merge pull request github#14893 from github/redsun82/swift-qldocs
Codegen: fix bug where stub rewriting globbles too much code
2 parents 257d94b + a18f1ef commit a8fcfd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/codegen/generators/qlgen.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ def _get_stub(cls: schema.Class, base_import: str, generated_import_prefix: str)
319319
_stub_qldoc_header = "// the following QLdoc is generated: if you need to edit it, do it in the schema file\n"
320320

321321
_class_qldoc_re = re.compile(
322-
rf"(?P<qldoc>(?:{re.escape(_stub_qldoc_header)})?/\*\*.*?\*/\s*|^\s*)class\s+(?P<class>\w+)",
322+
rf"(?P<qldoc>(?:{re.escape(_stub_qldoc_header)})?/\*\*.*?\*/\s*|^\s*)(?:class\s+(?P<class>\w+))?",
323323
re.MULTILINE | re.DOTALL)
324324

325325

0 commit comments

Comments
 (0)