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

Function extractJSONFromMarkdown

src/utils.tsx:39–45  ·  view source on GitHub ↗
(markdown: string)

Source from the content-addressed store, hash-verified

37}
38
39export function extractJSONFromMarkdown(markdown: string) {
40 const json = markdown.match(/```json\n([\s\S]+?)\n```/);
41 if (json) {
42 return json[1];
43 }
44 return markdown;
45}
46
47export function replaceLinkFormat(input: string): string {
48 return input.replace(

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected