MCPcopy
hub / github.com/PatrickJS/awesome-cursorrules / markdownAnchor

Function markdownAnchor

scripts/check-awesome-list.mjs:106–113  ·  view source on GitHub ↗
(heading)

Source from the content-addressed store, hash-verified

104}
105
106function markdownAnchor(heading) {
107 return heading
108 .toLowerCase()
109 .replace(/`/g, "")
110 .replace(/[^\w\s-]/g, "")
111 .trim()
112 .replace(/\s+/g, "-");
113}
114
115function extractSection(markdown, heading) {
116 const pattern = new RegExp(`^##\\s+${escapeRegExp(heading)}\\s*$`, "m");

Callers 1

checkContentsHierarchyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected