From d5fe045b361a3735509bfa2549efa0bd185bc7de Mon Sep 17 00:00:00 2001 From: Pinapelz Date: Thu, 16 Apr 2026 17:02:53 -0700 Subject: fix: performance issues for styled-componnt CSS animations --- src/app/game/game.utils.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/app/game/game.utils.ts') diff --git a/src/app/game/game.utils.ts b/src/app/game/game.utils.ts index 73d2884..6177d2c 100644 --- a/src/app/game/game.utils.ts +++ b/src/app/game/game.utils.ts @@ -27,7 +27,10 @@ export function parseLrcLines(lrcText: string): GameLine[] { if (timestamps.length === 0) continue; - const content = rawLine.slice(lastIndex).trim(); + const content = rawLine + .slice(lastIndex) + .replace(/\([^)]*\)/g, "") + .trim(); if (!content) continue; for (const ms of timestamps) { @@ -42,4 +45,4 @@ export function parseLrcLines(lrcText: string): GameLine[] { export function formatTime(ms: number): string { const s = Math.max(0, Math.floor(ms / 1000)); return `${Math.floor(s / 60)}:${String(s % 60).padStart(2, "0")}`; -} \ No newline at end of file +} -- cgit v1.2.3