diff --git a/www/packages/remark-rehype-plugins/src/utils/component-link-fixer.ts b/www/packages/remark-rehype-plugins/src/utils/component-link-fixer.ts index e1e56ea2fe..2aeae9d963 100644 --- a/www/packages/remark-rehype-plugins/src/utils/component-link-fixer.ts +++ b/www/packages/remark-rehype-plugins/src/utils/component-link-fixer.ts @@ -24,7 +24,7 @@ function matchMdLinks( ) { let linkMatches while ((linkMatches = MD_LINK_REGEX.exec(str)) !== null) { - if (!linkMatches.groups?.link) { + if (!linkMatches.groups?.link || linkMatches.groups?.link.startsWith("http")) { return } @@ -43,7 +43,7 @@ function matchValueLink( str: string, linkOptions: Omit ) { - if (!VALUE_LINK_REGEX.exec(str)) { + if (!VALUE_LINK_REGEX.exec(str) || str.startsWith("http")) { return str }