File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,6 +126,11 @@ function handleClick(event: MouseEvent) {
126126 @apply decoration-accent text-accent ;
127127}
128128
129+ .readme :deep(a [target = ' _blank' ]::after ) {
130+ content : ' ' ;
131+ @apply i-carbon :launch rtl-flip ms-1 size-[1em ] opacity-50;
132+ }
133+
129134.readme :deep(code ) {
130135 @apply font-mono ;
131136 font-size : 0.875em ;
Original file line number Diff line number Diff line change @@ -399,12 +399,6 @@ ${html}
399399 const isExternal = resolvedHref . startsWith ( 'http://' ) || resolvedHref . startsWith ( 'https://' )
400400 const relAttr = isExternal ? ' rel="nofollow noreferrer noopener"' : ''
401401 const targetAttr = isExternal ? ' target="_blank"' : ''
402- const isExternalIcon = isExternal
403- ? `<span
404- class="i-carbon:launch inline-block rtl-flip ms-1 size-[1em] opacity-50"
405- aria-hidden="true"
406- ></span>`
407- : ''
408402
409403 // Check if this is a playground link
410404 const provider = matchPlaygroundProvider ( resolvedHref )
@@ -424,7 +418,7 @@ ${html}
424418
425419 const hrefValue = resolvedHref . startsWith ( '#' ) ? resolvedHref . toLowerCase ( ) : resolvedHref
426420
427- return `<a href="${ hrefValue } "${ titleAttr } ${ relAttr } ${ targetAttr } >${ text } ${ isExternalIcon } </a>`
421+ return `<a href="${ hrefValue } "${ titleAttr } ${ relAttr } ${ targetAttr } >${ text } </a>`
428422 }
429423
430424 // GitHub-style callouts: > [!NOTE], > [!TIP], etc.
Original file line number Diff line number Diff line change @@ -346,7 +346,7 @@ describe('Markdown Content Extraction', () => {
346346 const result = await renderReadmeHtml ( markdown , 'test-pkg' )
347347
348348 expect ( result . html ) . toBe ( `<h3 id="user-content-title" data-level="1">Title</h3>
349- <p>Some <strong>bold</strong> text and a <a href="https://example.com" rel="nofollow noreferrer noopener" target="_blank">link<span class="i-carbon:launch inline-block rtl-flip ms-1 size-[1em] opacity-50"></span>< /a>.</p>
349+ <p>Some <strong>bold</strong> text and a <a href="https://example.com" rel="nofollow noreferrer noopener" target="_blank">link</a>.</p>
350350` )
351351 } )
352352 } )
You can’t perform that action at this time.
0 commit comments