From a18f1ef7cda0b5c7a352a75d2d0cb8029dfc94b7 Mon Sep 17 00:00:00 2001 From: Paolo Tranquilli Date: Thu, 23 Nov 2023 17:14:32 +0100 Subject: [PATCH] Codegen: fix bug where stub rewriting globbles too much code --- misc/codegen/generators/qlgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/codegen/generators/qlgen.py b/misc/codegen/generators/qlgen.py index 00280c04e66..dd1cb679be9 100755 --- a/misc/codegen/generators/qlgen.py +++ b/misc/codegen/generators/qlgen.py @@ -319,7 +319,7 @@ def _get_stub(cls: schema.Class, base_import: str, generated_import_prefix: str) _stub_qldoc_header = "// the following QLdoc is generated: if you need to edit it, do it in the schema file\n" _class_qldoc_re = re.compile( - rf"(?P(?:{re.escape(_stub_qldoc_header)})?/\*\*.*?\*/\s*|^\s*)class\s+(?P\w+)", + rf"(?P(?:{re.escape(_stub_qldoc_header)})?/\*\*.*?\*/\s*|^\s*)(?:class\s+(?P\w+))?", re.MULTILINE | re.DOTALL)