Skip to content

Commit c6c8ba5

Browse files
Clarify some whitespace handling in text-format spec.
Clarify whitespace and comments handling for Any names and extension names in the text-format spec. This paragraph was recently added and came up as not being worded clearly enough. PiperOrigin-RevId: 861548171
1 parent 982c3b2 commit c6c8ba5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

content/reference/protobuf/textformat-spec.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,9 +286,11 @@ TypeName = IDENT, { ".", IDENT } ;
286286
UrlPrefix = url_char, { url_char | "/" } ;
287287
```
288288

289-
Text format serializers should not write any whitespace characters between the
290-
brackets of an `ExtensionName` or `AnyName`. Parsers should trim any whitespace
291-
characters before processing an `ExtensionName` or `AnyName`.
289+
Text format serializers should not write any whitespace characters or comments
290+
between the brackets of an `ExtensionName` or `AnyName`. Parsers should skip any
291+
whitespace characters and comments between the brackets of an `ExtensionName` or
292+
`AnyName`. This includes whitespace and comments which split the name into
293+
multiple segments.
292294

293295
Regular fields and extension fields can have scalar or message values. `Any`
294296
fields are always messages. Example:

0 commit comments

Comments
 (0)