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

Support field separators on the last field of a message field. #1641

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

thomasvl
Copy link
Collaborator

https://protobuf.dev/reference/protobuf/textformat-spec/#fields calls out that MessageField and ScalarField both can be followed by a separator (, or ;).

https://protobuf.dev/reference/protobuf/textformat-spec/#message then replies on this to handle the separators within a message field.

The existing parsing was accepting separators after all fields for top level fields, but when the decoder was for a message field (i.e. - there is a terminator stop at), it wouldn't properly the final separator followed by terminator correctly.

https://protobuf.dev/reference/protobuf/textformat-spec/#fields calls out that
`MessageField` and `ScalarField` both can be followed by a separator (`,` or
`;`).

https://protobuf.dev/reference/protobuf/textformat-spec/#message then replies on
this to handle the separators within a message field.

The existing parsing was accepting separators after all fields for top level
fields, but when the decoder was for a message field (i.e. - there is a
terminator stop at), it wouldn't properly the final separator followed by
terminator correctly.
@thomasvl thomasvl self-assigned this Apr 26, 2024
@thomasvl thomasvl merged commit 4384644 into apple:main Apr 26, 2024
10 of 11 checks passed
@thomasvl thomasvl deleted the textformat_field_seperators branch April 26, 2024 20:32
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.

2 participants