Task 398: Add ID Attributes to Headings in markdownToHtml
未着手 ← タスク一覧
Task 398: Add ID Attributes to Headings in markdownToHtml
Status: DONE
Summary
The markdownToHtml function in templates.ts renders headings without id attributes, making intra-page anchor links impossible. For example, #航法系不一致の物理的原因 in a link won't resolve because the <h3> tag has no id. Add slugified IDs to all rendered headings to enable anchor linking.
Rationale
- CLAUDE.md: "Reports should link to other episode reports... use section anchors"
- Cross-episode.md has links to anchors within episode pages that can't resolve
- Summary sections already use
slugify()for theiridattributes — extend to inline headings
Implementation
- In
markdownToHtml, addidattribute to all heading tags using the existingslugifyfunction - Verify no duplicate IDs are generated
- Test that anchor links resolve correctly