Skip to content

Seven broken intra-doc anchors in docs/api/collections.md (entity-encoded generic headings slug differently than assumed) #339

Description

@marius-bughiu

What

Seven intra-document links in docs/api/collections.md point at anchors that do not exist, so clicking them scrolls nowhere.

Used Occurrences Real anchor
#celerityset-t-thasher 6 #celeritysett-thasher
#swissset-t-thasher 1 #swisssett-thasher

Why

The headings are entity-encoded generics — ## CeleritySet&lt;T, THasher&gt;. GitHub's slugger lowercases the rendered text and deletes <, > and , without substituting a separator, so CeleritySet<T, THasher> becomes celeritysett-thasher (double t, from …Set + T), not the intuitive celerityset-t-thasher.

Verified against the live rendering rather than inferred:

gh api repos/marius-bughiu/Celerity/contents/docs/api/collections.md \
  -H "Accept: application/vnd.github.html" | grep -oE 'id="user-content-[a-z0-9-]*"'

returns user-content-celeritysett-thasher and user-content-swisssett-thasher. The same command confirms ### IReadOnlyDictionary&lt;TKey, TValue?&gt; renders as ireadonlydictionarytkey-tvalue — so the pattern is consistent, and the six-plus-one links are simply wrong.

Fix

Correct the seven links. Worth pairing with a CI guard, since this class of rot is invisible in review: a step that renders each markdown file through the GitHub HTML endpoint (or a local slugger with the same rule), collects every id="user-content-…", and fails when a ](#fragment) in the same file has no matching id. That is a handful of lines and would also catch the next heading rename.

Scope is the whole docs/ tree plus README.md, not just collections.md — the check above was only run on the one file.

Found while adding the IDictionary<,> section in #338; deliberately left out of that PR to keep it to one concern.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions