MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / Link

Function Link

packages/react/src/components/markdown.tsx:45–54  ·  view source on GitHub ↗
(props: ComponentPropsWithoutRef<"a"> & { children?: ReactNode; node?: unknown })

Source from the content-addressed store, hash-verified

43}
44
45function Link(props: ComponentPropsWithoutRef<"a"> & { children?: ReactNode; node?: unknown }) {
46 const { children, href, node: _node, ...rest } = props;
47 const safeHref = sanitizeMarkdownUrl(href);
48 if (!safeHref) return <span>{children}</span>;
49 return (
50 <a {...rest} href={safeHref} rel="noopener noreferrer" target="_blank">
51 {children}
52 </a>
53 );
54}
55
56function Image(props: ComponentPropsWithoutRef<"img"> & { node?: unknown }) {
57 const { alt } = props;

Callers

nothing calls this directly

Calls 1

sanitizeMarkdownUrlFunction · 0.85

Tested by

no test coverage detected