diff options
| author | Pinapelz <yukais@pinapelz.com> | 2026-04-16 17:02:53 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2026-04-16 17:02:53 -0700 |
| commit | d5fe045b361a3735509bfa2549efa0bd185bc7de (patch) | |
| tree | ffcf1d82918a9e8b73f679a71cf3b41d31022bae /src/app/game/game.utils.ts | |
| parent | d14bf345284afeff8a8baab27c639cd577ba2a5e (diff) | |
fix: performance issues for styled-componnt CSS animations
Diffstat (limited to 'src/app/game/game.utils.ts')
| -rw-r--r-- | src/app/game/game.utils.ts | 7 |
1 files changed, 5 insertions, 2 deletions
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 +} |
