Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes extra whitespace on generated comments. #1950

Merged
merged 2 commits into from
Aug 12, 2016
Merged

Fixes extra whitespace on generated comments. #1950

merged 2 commits into from
Aug 12, 2016

Conversation

sergiocampama
Copy link
Contributor

No description provided.

@grpc-kokoro
Copy link

Thanks for your pull request. The automated tests will run as soon as one of the admins verifies this change is ok to test.

// If not a one line, need to add the first space before *, as
// StripWhitespace would have removed it.
line = (is_one_line ? "" : " ") + line;
final_comments += line + suffix;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is we drop the \n from both suffixes, then I think you can just do:

line = prefix + line + suffix
StripWhiteSpace(&line)
final_comments += line + "\n"

And there's isn't the special knowledge about oneline needing the space back.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scratch that, it still eats the leading space.

@thomasvl thomasvl merged commit a248420 into protocolbuffers:master Aug 12, 2016
liujisi pushed a commit to liujisi/protobuf that referenced this pull request Aug 17, 2016
@sergiocampama sergiocampama deleted the docs branch September 23, 2016 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants