File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -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 >
Original file line number Diff line number Diff line change @@ -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;
You can’t perform that action at this time.
0 commit comments