diff --git a/.generator/src/generator/formatter.py b/.generator/src/generator/formatter.py index f2b0a796a..0068c9630 100644 --- a/.generator/src/generator/formatter.py +++ b/.generator/src/generator/formatter.py @@ -70,7 +70,7 @@ def is_primitive(schema): def block_comment(comment, prefix="///", first_line=True): - comment = re.sub(r"(\w+://[^\s\(\)]+)", r"<\1>", comment) + comment = re.sub(r"(\w+://[^\s\(\)]+)", r"<\1>", comment or "") lines = comment.split("\n") start = "" if first_line else lines[0] + "\n" return (start + "\n".join(f"{prefix} {line}".rstrip() for line in lines[(0 if first_line else 1) :])).rstrip()