diff --git a/components/text.js b/components/text.js index 6e0ce9b088..a6f733229f 100644 --- a/components/text.js +++ b/components/text.js @@ -124,6 +124,13 @@ export default memo(function Text ({ nofollow, imgproxyUrls, children, tab, ...o return <>{children} } + // If [text](url) was parsed as and text is not empty, we don't render it as an image + // since it was probably a concious choice to include text. + const text = children?.[0] + if (!!text && !/^https?:\/\//.test(text)) { + return {children[0]} + } + // assume the link is an image which will fallback to link if it's not return {children} },