You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[quality] Markdown heading anchors (file.md#fragment) are not validated by page-meta.test.mjs #385
scripts/page-meta.test.mjs → docLinkProblems resolves every relative Markdown link to a committed file, but strips the #fragment first (target.replace(/[?#].*$/, "")) and skips same-document #… links outright. Four heading anchors in the repository are therefore never checked:
Renaming the README's ## Local preview and running the checks heading leaves CONTRIBUTING.md — the first file GitHub shows a newcomer from the new-PR page — pointing at a fragment that scrolls nowhere, and no gate notices. doc-paths.test.mjs covers backticked paths and check-links.sh covers HTML hrefs only, so this is the one link form with no gate.
Evidence (static site, single suite): node --test scripts/*.test.mjs @ 3c0fd74 passes 922/922 with the README heading renamed; the only Markdown-link rule is the file-existence check at docLinkProblems.
Recommendation
Extend docLinkProblems to slug the target Markdown file's headings the way GitHub does (lowercase, inline markup stripped, punctuation dropped, each space → -, duplicates suffixed -1, -2; plus explicit id=/name= on inline HTML) and require the fragment to match, for *.md targets and for same-document # links. Add fixture self-tests for the slugger and the new rule, following the file's existing pattern.
Decision taken by hive: keep the rule inside page-meta.test.mjs (where Markdown links are already gated) rather than a new script, so ci-wiring.test.mjs/README ## Checks need only a one-sentence update.
Priority
Impact: medium (contributor-facing doc link rot goes unnoticed)
Activity