MCPcopy Create free account
hub / github.com/Hashnode/starter-kit / replacer

Function replacer

packages/utils/renderer/markdownToHtml.ts:72–75  ·  view source on GitHub ↗
(substring: string, ...args: any[])

Source from the content-addressed store, hash-verified

70 const regex = /@<a([^>]*)href="@(\S+)"([^>]*)>((?:.(?!\<\/a\>))*.)<\/a>/g;
71
72 const replacer = (substring: string, ...args: any[]) => {
73 const [p1, p2, p3, p4] = args;
74 return `<a target='_blank' rel='noopener noreferrer' href="https://hashnode.com/@${p2}">${p4}</a>`;
75 };
76 return content.replace(regex, replacer);
77};
78

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected