MCPcopy Create free account
hub / github.com/GrantCuster/gemini-spatial-example / replaceLinkFormat

Function replaceLinkFormat

src/utils.tsx:47–55  ·  view source on GitHub ↗
(input: string)

Source from the content-addressed store, hash-verified

45}
46
47export function replaceLinkFormat(input: string): string {
48 return input.replace(
49 /\[([^\]]+)\]\((\d+ \d+ \d+ \d+)\)/g,
50 (_, text, numbers) => {
51 const formattedNumbers = numbers.replace(/ /g, "-");
52 return `[${text}](#bb-${formattedNumbers})`;
53 },
54 );
55}
56
57
58type ParsedResult = {

Callers 1

MardownResponseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected