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

Function extractMarkdownLinks

scripts/check-awesome-list.mjs:176–183  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

174}
175
176function extractMarkdownLinks(text) {
177 const links = [];
178 const pattern = /(?<!!)\[[^\]]+\]\(([^)\s]+(?:\s+"[^"]*")?)\)/g;
179 for (const match of text.matchAll(pattern)) {
180 links.push(match[1].replace(/\s+".*"$/, ""));
181 }
182 return links;
183}
184
185function toLocalTarget(target) {
186 const cleanTarget = decodeURIComponent(target.replace(/^<|>$/g, ""));

Callers 1

checkRuleLinksFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected