-
Notifications
You must be signed in to change notification settings - Fork 22
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
Editorial: Add brief explanations to examples #232
Conversation
@sisidovski @tunetheweb wdyt? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure this resolves #229, but the PR itself LGTM.
spec.bs
Outdated
|
||
This is a more complicated pattern which includes: | ||
* [=part/modifier/optional=] parts marked with `?` (braces are needed to make it unambiguous exactly what is optional), and | ||
* a [=part/type/regexp=] part named "`id`" which uses a regular expression to define what sorts of substrings match (the parentheses are required to mark it as a regular expression, and are not part of the regexp itself) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want a dot .
at the end of the paragraph?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a pretty fine point of style (punctuating bulleted lists is complicated), but on average the search results I found agree that there should be a period here, so done.
IMO adding an explicit explanation paragraph how to create a custom regexp group in 2. Pattern strings makes sense. WDYT? |
Added the text "enclosed in parentheses" to that section. |
These examples form the only quick reference material in the spec. While MDN goes into more depth, brief explanations of what is happening in this syntax don't take up much room and may make it easier to tell what's going on, especially with regexp parts.
Resolves #229.
Preview | Diff