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:
@@ -24,7 +24,7 @@ function matchMdLinks(
|
|||||||
) {
|
) {
|
||||||
let linkMatches
|
let linkMatches
|
||||||
while ((linkMatches = MD_LINK_REGEX.exec(str)) !== null) {
|
while ((linkMatches = MD_LINK_REGEX.exec(str)) !== null) {
|
||||||
if (!linkMatches.groups?.link) {
|
if (!linkMatches.groups?.link || linkMatches.groups?.link.startsWith("http")) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +43,7 @@ function matchValueLink(
|
|||||||
str: string,
|
str: string,
|
||||||
linkOptions: Omit<FixLinkOptions, "linkedPath">
|
linkOptions: Omit<FixLinkOptions, "linkedPath">
|
||||||
) {
|
) {
|
||||||
if (!VALUE_LINK_REGEX.exec(str)) {
|
if (!VALUE_LINK_REGEX.exec(str) || str.startsWith("http")) {
|
||||||
return str
|
return str
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user