Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.

Commit f6aa679

Browse files
strip backslashes from comments
1 parent 271890d commit f6aa679

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/betterproto2_compiler/plugin/models.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,10 @@ def get_comment(
129129
# We don't add this space to the generated file.
130130
lines = [line[1:] if line and line[0] == " " else line for line in lines]
131131

132-
return "\n".join(lines)
132+
return "\n".join(lines).replace("\\","\\\\")
133133

134134
return ""
135135

136-
137136
@dataclass(kw_only=True)
138137
class ProtoContentBase:
139138
"""Methods common to MessageCompiler, ServiceCompiler and ServiceMethodCompiler."""

0 commit comments

Comments
 (0)