⚠ ネタバレ注意: 本サイトはSFアニメ「SOLAR LINE」の内容を詳細に分析しています。未視聴の方はご注意ください。
📝 AI生成コンテンツ: 本考証の大部分は AI(Claude Code 等)によって生成されています。内容の正確性については原作および引用元をご確認ください。

Task 165: Fix NaN Timestamp Links in Source Citations

完了 ← タスク一覧

Task 165: Fix NaN Timestamp Links in Source Citations

Status: DONE

Problem

The parseTimestamp() function in templates.ts only handled simple MM:SS or HH:MM:SS formats. Source citations in transfer analyses sometimes use range timestamps (e.g., 02:22-04:09(航路ブリーフィング〜天王星脱出)) or timestamps with descriptive text. These produced NaN when split and parsed as numbers.

Affected pages (8 NaN links total):

Fix

Updated parseTimestamp() to use a regex to extract the first MM:SS or HH:MM:SS pattern from the string, ignoring range delimiters, description text, and Japanese characters.

Tests Added

8 new tests:

Verification