From 9504c41238a5ac005a8873dd0159f7a349ed7eff Mon Sep 17 00:00:00 2001 From: Shunya Shishido Date: Wed, 13 Sep 2023 23:20:49 +0900 Subject: [PATCH] Updates the regular expression to work with the v flag instead of u This will fix #178. --- spec.bs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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|.