From 125968095de8387ae9b0960802c8cc9c4440ef35 Mon Sep 17 00:00:00 2001 From: Jeremy Roman Date: Mon, 29 Jan 2024 10:50:49 -0500 Subject: [PATCH] Serialize the next numeric name We need to explicitly convert this from an integer to a string. Fixes #208. --- spec.bs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.bs b/spec.bs index a3224a6..4277a3b 100644 --- a/spec.bs +++ b/spec.bs @@ -1412,7 +1412,7 @@ To add a part given a [=pattern parser=] |parser|, a string |prefix|,

Next, we determine the [=part=] [=part/name=]. This can be explicitly provided by a "`name`" [=token=] or be automatically assigned. 1. If |name token| is not null, then set |name| to |name token|'s [=token/value=]. 1. Otherwise if |regexp or wildcard token| is not null: - 1. Set |name| to |parser|'s [=pattern parser/next numeric name=]. + 1. Set |name| to |parser|'s [=pattern parser/next numeric name=], [=serialize an integer|serialized=]. 1. Increment |parser|'s [=pattern parser/next numeric name=] by 1. 1. If the result of running [=is a duplicate name=] given |parser| and |name| is true, then throw a {{TypeError}}. 1. Let |encoded prefix| be the result of running |parser|'s [=pattern parser/encoding callback=] given |prefix|.