From 4bdb8003bbb6f5748e4bdcd3f249bd39082b2115 Mon Sep 17 00:00:00 2001 From: Fredrik Burmester Date: Tue, 6 Jan 2026 15:28:58 +0100 Subject: [PATCH] chore: lint --- utils/hls/parseM3U8ForSubtitles.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/utils/hls/parseM3U8ForSubtitles.ts b/utils/hls/parseM3U8ForSubtitles.ts index e5d35fcf..5e0ad382 100644 --- a/utils/hls/parseM3U8ForSubtitles.ts +++ b/utils/hls/parseM3U8ForSubtitles.ts @@ -45,9 +45,8 @@ export async function parseM3U8ForSubtitles( function parseAttributes(line: string): { [key: string]: string } { const attributes: { [key: string]: string } = {}; const regex = /([A-Z-]+)=(?:"([^"]*)"|([^,]*))/g; - let match: RegExpExecArray | null; - while ((match = regex.exec(line)) !== null) { + for (const match of line.matchAll(regex)) { const key = match[1]; const value = match[2] ?? match[3]; // quoted or unquoted attributes[key] = value;