diff --git a/src/betterproto2_compiler/plugin/models.py b/src/betterproto2_compiler/plugin/models.py index ea385cf1..bc4d75dc 100644 --- a/src/betterproto2_compiler/plugin/models.py +++ b/src/betterproto2_compiler/plugin/models.py @@ -129,11 +129,10 @@ def get_comment( # We don't add this space to the generated file. lines = [line[1:] if line and line[0] == " " else line for line in lines] - return "\n".join(lines) + return "\n".join(lines).replace("\\","\\\\") return "" - @dataclass(kw_only=True) class ProtoContentBase: """Methods common to MessageCompiler, ServiceCompiler and ServiceMethodCompiler."""