MCPcopy Create free account
hub / github.com/dailydotdev/apps / shouldOpenAnchorImage

Function shouldOpenAnchorImage

packages/shared/src/components/Markdown.tsx:63–72  ·  view source on GitHub ↗
(
  anchor: HTMLAnchorElement | null,
  imageSrc: string,
)

Source from the content-addressed store, hash-verified

61}
62
63function shouldOpenAnchorImage(
64 anchor: HTMLAnchorElement | null,
65 imageSrc: string,
66): boolean {
67 if (!anchor?.href) {
68 return true;
69 }
70
71 return isImageUrl(anchor.href) || isSameUrl(anchor.href, imageSrc);
72}
73
74const UserEntityCard = dynamic(() => import('./cards/entity/UserEntityCard'), {
75 ssr: false,

Callers 1

MarkdownFunction · 0.85

Calls 2

isImageUrlFunction · 0.90
isSameUrlFunction · 0.85

Tested by

no test coverage detected