diff --git a/spec.bs b/spec.bs index 99fc9ea..5b2e916 100644 --- a/spec.bs +++ b/spec.bs @@ -423,8 +423,8 @@ A [=component=] has an associated group name list, a [= 1. Let |part list| be the result of running [=parse a pattern string=] given |input|, |options|, and |encoding callback|. 1. Let (|regular expression string|, |name list|) be the result of running [=generate a regular expression and name list=] given |part list| and |options|. 1. Let |flags| be an empty string. - 1. If |options|'s [=options/ignore case=] is true then set |flags| to "`ui`". - 1. Otherwise set |flags| to "`u`" + 1. If |options|'s [=options/ignore case=] is true then set |flags| to "`vi`". + 1. Otherwise set |flags| to "`v`" 1. Let |regular expression| be [$RegExpCreate$](|regular expression string|, |flags|). If this throws an exception, catch it, and throw a {{TypeError}}.
The specification uses regular expressions to perform all matching, but this is not required. Implementations are free to perform matching directly against the [=/part list=] when possible; e.g. when there are no custom regexp matching groups. If there are custom regular expressions, however, its important that they should be immediately evaluated in the [=compile a component=] algorithm so an error can be thrown if they are invalid. 1. Let |pattern string| be the result of running [=generate a pattern string=] given |part list| and |options|.