Skip to content

Commit

Permalink
docs: fix broken pages due to remark plugin (#8694)
Browse files Browse the repository at this point in the history
* docs: fix broken pages due to remark plugin

* refactor condition

* Update component-link-fixer.ts
  • Loading branch information
shahednasser authored Aug 21, 2024
1 parent 2f01669 commit 1e07ab1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand All @@ -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
}

Expand Down

0 comments on commit 1e07ab1

Please sign in to comment.