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

Function toAbsoluteLinks

scripts/convert-readme-links.mjs:55–60  ·  view source on GitHub ↗
(markdown, prefix)

Source from the content-addressed store, hash-verified

53}
54
55function toAbsoluteLinks(markdown, prefix) {
56 return markdown.replace(
57 new RegExp(`${markdownLinkPrefix}\\]\\((?:\\.\\/)?rules\\/([^)]*)\\)`, "g"),
58 (_match, target) => `](${prefix}${target})`,
59 );
60}
61
62function toRelativeLinks(markdown) {
63 return markdown.replace(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected