mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 13:31:02 +08:00
Merge remote-tracking branch 'github/protoc_c_comments' into next
This commit is contained in:
commit
cbe7b84a14
@ -225,6 +225,14 @@ void PrintComment (io::Printer* printer, string comment)
|
|||||||
if (comment_lines[i][0] == '/')
|
if (comment_lines[i][0] == '/')
|
||||||
comment_lines[i] = ' ' + comment_lines[i];
|
comment_lines[i] = ' ' + comment_lines[i];
|
||||||
|
|
||||||
|
/* Or cause other compiler issues. */
|
||||||
|
size_t delim_i;
|
||||||
|
while ((delim_i = comment_lines[i].find("/*")) != string::npos)
|
||||||
|
comment_lines[i][delim_i] = ' ';
|
||||||
|
|
||||||
|
while ((delim_i = comment_lines[i].find("*/")) != string::npos)
|
||||||
|
comment_lines[i][delim_i + 1] = ' ';
|
||||||
|
|
||||||
printer->Print (" *$line$\n", "line", comment_lines[i]);
|
printer->Print (" *$line$\n", "line", comment_lines[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user