diff --git a/components/text.js b/components/text.js index 6e0ce9b08..930d4bffd 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 and not a link itself, + // 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 {text} + } + // assume the link is an image which will fallback to link if it's not return {children} },