Skip to content

Commit

Permalink
Update spec text to match final implementation. (#99)
Browse files Browse the repository at this point in the history
  • Loading branch information
wanderview committed Aug 31, 2021
1 parent 7d8da85 commit dc5145b
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1298,15 +1298,16 @@ To <dfn export>generate a regular expression and name list</dfn> from a given [=
1. Else if |part|'s [=part/type=] is "<a for=part/type>`full-wildcard`</a>", then set |regexp value| to [=full wildcard regexp value=].
1. If |part|'s [=part/prefix=] is the empty string and |part|'s [=part/suffix=] is the empty string:
<div class=note>
<p>If there is no [=part/prefix=] or [=part/suffix=] then generation depends on the modifier. If there is no modifier, it uses the following simple form:
<p>`(<regexp value>)`
<p>If there is a modifier, however, we will use the more complex form:
<p class=allow-2119>If there is no [=part/prefix=] or [=part/suffix=] then generation depends on the modifier. If there is no modifier or just the optional modifier, it uses the following simple form:
<p>`(<regexp value>)<modifier>`
<p>If there is a repeating modifier, however, we will use the more complex form:
<p>`((?:<regexp value>)<modifier>)`
</div>
1. If |part|'s [=part/modifier=] is "<a for=part/modifier>`none`</a>", then:
1. If |part|'s [=part/modifier=] is "<a for=part/modifier>`none`</a>" or "<a for=part/modifier>`optional`</a>", then:
1. Append "`(`" to the end of |result|.
1. Append |regexp value| to the end of |result|.
1. Append "`)`" to the end of |result|.
1. Append the result of running [=convert a modifier to a string=] given |part|'s [=part/modifier=] to the end of |result|.
1. Else:
1. Append "`((?:`" to the end of |result|.
1. Append |regexp value| to the end of |result|.
Expand Down

0 comments on commit dc5145b

Please sign in to comment.