From 7cd2e2d4e001d635f2fd71048e5f1183bdc5f5ac Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Thu, 15 Feb 2024 15:47:41 -0600 Subject: [PATCH] fix(developer): fix for incorrectly-stateful regex - take out the /g flag for regex used with .exec For #10734 --- common/web/types/src/ldml-keyboard/pattern-parser.ts | 2 +- developer/src/kmc-ldml/src/compiler/tran.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/common/web/types/src/ldml-keyboard/pattern-parser.ts b/common/web/types/src/ldml-keyboard/pattern-parser.ts index cc8d8aab52..8901de6ddd 100644 --- a/common/web/types/src/ldml-keyboard/pattern-parser.ts +++ b/common/web/types/src/ldml-keyboard/pattern-parser.ts @@ -400,7 +400,7 @@ export class VariableParser { /** * Pattern for matching a capture set reference `($[set])` */ - public static readonly CAPTURE_SET_REFERENCE = /\(\$\[([0-9A-Za-z_]{1,32})\]\)/g; + public static readonly CAPTURE_SET_REFERENCE = /\(\$\[([0-9A-Za-z_]{1,32})\]\)/; /** * `$[1:variable]` diff --git a/developer/src/kmc-ldml/src/compiler/tran.ts b/developer/src/kmc-ldml/src/compiler/tran.ts index 4e521f3986..6bf1e28a1a 100644 --- a/developer/src/kmc-ldml/src/compiler/tran.ts +++ b/developer/src/kmc-ldml/src/compiler/tran.ts @@ -126,7 +126,6 @@ export abstract class TransformCompiler