Skip to content

Commit 7c8e5d7

Browse files
authored
Adjusted proposal for grammar-like code block on extension page (#5857)
Follow-up proposal to #5856: _Copying my thoughts from #5856 (comment) > @MaryaBelanger Can we keep the original symbols as well as the comments? Otherwise to those that are familiar with the syntax or skim past the comments, it might look like only one member definition is allowed. > > With both the syntax and the comments, all readers are accounted for, plus the readers may become more familiar with the syntax as a result :)
1 parent 947dc5b commit 7c8e5d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/content/language/extension-methods.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ to avoid a name conflict when invoking an extension explicitly.
197197
Use the following syntax to create an extension:
198198

199199
```plaintext
200-
extension <extension name> on <type> { // extension-name is optional
201-
(<member definition>) // can provide one or more member-definitions
200+
extension <extension name>? on <type> { // <extension-name> is optional
201+
(<member definition>)* // Can provide one or more <member definition>.
202202
}
203203
```
204204

0 commit comments

Comments
 (0)