irongit

A Regex file extension that makes it way easier to edit large regex.

broke down the group highlighting

FIRST_NAME LAST_NAMEauthored
parent 8032159commit 056e9d1a0e9faf2f2fe109871ec7aa7a5102d7c9Browse files

1 file changed, +4 -6

+4-6src/extension.ts
@@ -147,12 +147,10 @@ function updateGroupMatches(
147147 const groupMatch = match.groups[groupName];
148148
149149 if (groupMatch) {
150- const startPos = textEditor.document.positionAt(
151- match.index + match[0].indexOf(groupMatch)
152- );
153- const endPos = textEditor.document.positionAt(
154- match.index + match[0].indexOf(groupMatch) + groupMatch.length
155- );
150+ const startInd = match[0].indexOf(groupMatch);
151+ const startPos = textEditor.document.positionAt(match.index + startInd);
152+ const endInd = startInd + groupMatch.length;
153+ const endPos = textEditor.document.positionAt(match.index + endInd);
156154 const matchRange = new vscode.Range(startPos, endPos);
157155
158156 if (!groupMatches[groupName]) {