mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-25 17:57:41 +00:00
fix(developer): fix for incorrectly-stateful regex
- take out the /g flag for regex used with .exec For #10734
This commit is contained in:
parent
5edb70f07a
commit
7cd2e2d4e0
2 changed files with 1 additions and 2 deletions
|
|
@ -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]`
|
||||
|
|
|
|||
|
|
@ -126,7 +126,6 @@ export abstract class TransformCompiler<T extends TransformCompilerType, TranBas
|
|||
let cookedFrom = transform.from;
|
||||
|
||||
cookedFrom = sections.vars.substituteStrings(cookedFrom, sections);
|
||||
// TODO: handle 'map' case
|
||||
const mapFrom = VariableParser.CAPTURE_SET_REFERENCE.exec(cookedFrom);
|
||||
const mapTo = VariableParser.MAPPED_SET_REFERENCE.exec(transform.to || '');
|
||||
if (mapFrom && mapTo) { // TODO-LDML: error cases
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue