mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-11 17:56:30 +03:00
Remove unnessary links (#12159)
There is no need to link to the image we are already viewing and this is also considered an accessibility issue.
This commit is contained in:
parent
031f6c7b60
commit
9555e7aecf
|
@ -88,10 +88,16 @@ const Image = ({ src, alt, title, href, ...props }) => {
|
|||
const markdownComponents = { code: InlineCode, p: Fragment, a: Link }
|
||||
return (
|
||||
<figure className="gatsby-resp-image-figure">
|
||||
<Link className={linkClassNames} href={href ?? src} hidden forceExternal>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
{href ? (
|
||||
<Link className={linkClassNames} href={href} hidden forceExternal>
|
||||
{/* eslint-disable-next-line @next/next/no-img-element */}
|
||||
<img className={classes.image} src={src} alt={alt} width={650} height="auto" />
|
||||
</Link>
|
||||
) : (
|
||||
/* eslint-disable-next-line @next/next/no-img-element */
|
||||
<img className={classes.image} src={src} alt={alt} width={650} height="auto" />
|
||||
</Link>
|
||||
)}
|
||||
|
||||
{title && (
|
||||
<figcaption className="gatsby-resp-image-figcaption">
|
||||
<MarkdownToReact markdown={title} />
|
||||
|
|
Loading…
Reference in New Issue
Block a user