mirror of https://github.com/garrytan/gstack.git
- buildTocBlock minted `toc-N` ids for its `#toc-N` anchors and `data-toc-target` spans, but no body heading ever received those ids, so every TOC link was a dead fragment and Paged.js had no target to count page numbers against - Add annotateHeadingIds: walk H1-H3 in document order, inject `id="toc-N"` on headings that lack one, preserve any heading that already declares an id and point the TOC at it - Share the resolved heading/id list between body and TOC so anchors and targets always agree - 3 regression tests: anchor-resolves-to-heading, existing-id preserved, no id injection when toc is off Fixes #1689. |
||
|---|---|---|
| .. | ||
| src | ||
| test | ||
| SKILL.md | ||
| SKILL.md.tmpl | ||