(props: ComponentPropsWithoutRef<"a"> & { children?: ReactNode; node?: unknown })
| 43 | } |
| 44 | |
| 45 | function 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 | |
| 56 | function Image(props: ComponentPropsWithoutRef<"img"> & { node?: unknown }) { |
| 57 | const { alt } = props; |
nothing calls this directly
no test coverage detected