/** * Reduce an anchor id (ours or GitHub's) to a comparable form. * * Everything but the final hyphen-run collapse is the shared heading-slug * chain: emoji strip → lowercase → drop non-word chars → spaces to hyphens → * trim edge hyphens. The collapse is this module's own addition, covering * GitHub's *interior* divergence — `## 💬 Community & Support` slugs to * `#-community--support` (a double hyphen around the dropped `&`) against our * `community-support`. * * `'-getting-started'` → `'getting-started'` * `'-community--support'` → `'community-support'` * `'Getting Started'` → `'getting-started'` */ export declare function normalizeAnchorId(raw: string): string; /** * Resolve a `#hash` id that no exact lookup matched, by comparing normalized * forms. Returns `null` when nothing in the document matches, so the caller * can leave the browser's default behavior alone rather than hijacking a * click that was never ours to handle. * * Three passes, in order of how much they assume: * 1. a single `getElementById` on the normalized id — catches the whole * emoji-hyphen family without walking the DOM; * 2. a heading scan — catches ids whose own raw form normalizes differently * (e.g. `a---b`, from a title containing a literal ` - `); * 3. the duplicate-heading shift (see `findDuplicateShifted`) — last, * because it is the only pass that resolves to an id the fragment did * not name. */ export declare function findAnchorElementByNormalizedId(rawId: string, doc: Document): HTMLElement | null; //# sourceMappingURL=anchor-id.d.ts.map