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

Fixed empty line after formating repeated #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

nimrof
Copy link
Contributor

@nimrof nimrof commented Oct 10, 2023

This fixes a "cosmetic bug" that formatting of repeated generates a extra empty line after it is done

afik. the source of the problem is that first is not set when printing repeated as the loop ends with continue.

if (field.IsRepeated && !field.IsMap)
{
WriteRepeatedField(writer, field, value);
continue;
}
WriteSingleField(writer, field, value);
first = false;

After this is fixed there is a line generated before new fields is formatted, but the repeated formatting is already compensating for the missing separator so it needs to be fixed to and that is the changes from line 290+

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant