Skip to content

Commit 571b3c2

Browse files
Copilotmrjf
andauthored
Simplify strExtractGroups: remove redundant fallback for column width
Since groupCount is now determined from the regex structure, the rows.reduce fallback is never reached. Use groupCount directly. Agent-Logs-Url: https://github.com/githubnext/tsessebe/sessions/93a0148a-3bf6-4490-a4b9-f52f8d6a89e5 Co-authored-by: mrjf <180956+mrjf@users.noreply.github.com>
1 parent 1bba09c commit 571b3c2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/stats/string_ops_extended.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ export function strExtractGroups(
190190
});
191191
});
192192

193-
const width = groupCount > 0 ? groupCount : rows.reduce((w, r) => Math.max(w, r.length), 0);
193+
const width = groupCount;
194194

195195
// Use named groups if available and count matches; otherwise use 0-indexed strings.
196196
const colNames: string[] =

0 commit comments

Comments
 (0)