authorgravatar for saikrisha.ambeti1@gmail.comSaikrishna Ambeti <saikrisha.ambeti1@gmail.com> 2026-10-10 16:31:08+05:30
committergravatar for noreply@github.comGitHub <noreply@github.com> 2026-10-10 06:01:08-05:00
logd6f3af77192adfb2304769096eeec59d3464aa21
treed973c83fa6ccba44815981a54c57253ecb84429a
parent6266af3f1f688497ef9717b87b82eafc5240418c
signature Signed by PGP key B5690EEEBB952194

fix(web): omit underlines on markdown image links (#17728)


2 files changed, 5 insertions(+), 3 deletions(-)

apps/web/src/components/ChatMarkdown.tsx+3-1
......@@ -2943,6 +2943,7 @@ const CHAT_MARKDOWN_COMPONENTS = {
29432943 : null;
29442944 if (!fileLinkMeta) {
29452945 const faviconHost = resolveExternalWebLinkHost(href);
2946 const hasText = hastHasText(node);
29462947 const pullRequestAutolink = String(
29472948 (props as Record<string, unknown>)["data-pull-request-autolink"] ?? "",
29482949 );
......@@ -2974,6 +2975,7 @@ const CHAT_MARKDOWN_COMPONENTS = {
29742975 {...props}
29752976 className={cn(props.className, pullRequestAutolink === "commit" && "font-mono")}
29762977 data-markdown-copy={pullRequestCopy}
2978 data-markdown-image-link={!hasText || undefined}
29772979 href={href}
29782980 target={isSameDocumentLink ? undefined : "_blank"}
29792981 rel={isSameDocumentLink ? undefined : "noopener noreferrer"}
......@@ -3093,7 +3095,7 @@ const CHAT_MARKDOWN_COMPONENTS = {
30933095 });
30943096 }}
30953097 >
3096 {faviconHost && hastHasText(node) && !isPullRequestAutolink ? (
3098 {faviconHost && hasText && !isPullRequestAutolink ? (
30973099 <MarkdownExternalLinkContent host={faviconHost} plainText={plainHastText(node)}>
30983100 {linkChildren}
30993101 </MarkdownExternalLinkContent>
apps/web/src/index.css+2-2
......@@ -1895,8 +1895,8 @@ code {
18951895 color: var(--info-foreground);
18961896}
18971897
1898.chat-markdown a:not(.chat-markdown-file-link):hover,
1899.chat-markdown a:not(.chat-markdown-file-link):focus-visible {
1898.chat-markdown a:not(.chat-markdown-file-link, [data-markdown-image-link]):hover,
1899.chat-markdown a:not(.chat-markdown-file-link, [data-markdown-image-link]):focus-visible {
19001900 background-image: radial-gradient(circle, currentcolor 0.75px, transparent 1px);
19011901 background-position: left bottom;
19021902 background-repeat: repeat-x;