MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / addHeadingAnchors

Function addHeadingAnchors

docs/script.js:475–489  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

473
474 // Add anchor links to headings with IDs
475 const addHeadingAnchors = () => {
476 const headings = docsContent.querySelectorAll("h1[id], h2[id], h3[id], h4[id]");
477 headings.forEach((heading) => {
478 if (heading.querySelector(".docs-heading-anchor")) return;
479 const id = heading.id;
480 if (!id) return;
481
482 const anchor = document.createElement("a");
483 anchor.className = "docs-heading-anchor";
484 anchor.href = `#${id}`;
485 anchor.setAttribute("aria-label", "Link to this section");
486
487 heading.insertBefore(anchor, heading.firstChild);
488 });
489 };
490
491 // Wrap tables in scrollable containers for mobile
492 const wrapTables = () => {

Callers 1

script.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected