Fix csharp doc commments

pull/15955/head
tony newell 1 year ago
parent fe6edca15b
commit 299c78612d
  1. 8
      src/google/protobuf/compiler/csharp/csharp_doc_comment.cc

@ -54,7 +54,13 @@ void WriteDocCommentBodyImpl(io::Printer* printer, SourceLocation location) {
printer->Print("///\n");
}
last_was_empty = false;
printer->Print("///$line$\n", "line", *it);
// If the comment has an extra slash at the start then this can cause the C# compiler
// to complain when generating the XML documentation
// Issue https://github.com/grpc/grpc/issues/35905
if (line[0] == '/') {
line.replace(0,1,"/");
}
printer->Print("///$line$\n", "line", line);
}
}
printer->Print("/// </summary>\n");

Loading…
Cancel
Save