docs: fix broken pages due to remark plugin (#8694)

* docs: fix broken pages due to remark plugin

* refactor condition

* Update component-link-fixer.ts
This commit is contained in:
Shahed Nasser
2024-08-21 15:29:46 +03:00
committed by GitHub
parent 2f0166901f
commit 1e07ab1b8d

View File

@@ -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<FixLinkOptions, "linkedPath">
) {
if (!VALUE_LINK_REGEX.exec(str)) {
if (!VALUE_LINK_REGEX.exec(str) || str.startsWith("http")) {
return str
}