Skip to content

Commit

Permalink
[MEI-87]: Relative asset paths conflicting with links checker
Browse files Browse the repository at this point in the history
  • Loading branch information
motiontx committed Mar 29, 2024
1 parent 6406dda commit 8cc6035
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/actions/validate-docs-links/src/checker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,8 +205,8 @@ function traverseTreeAndValidateLinks(tree: any, doc: Document, setFailed: Failu
relative: [],
}

// Matches markdown links like [text](link)
const linkRegex = /\[[^\[\]]+\]\([^\(\)]+\)/gm
// Matches markdown links like [text](link) (excluding those that end with a file extension)
const linkRegex = /^(?!.*\.[a-zA-Z]+\)$)\[[^\[\]]+\]\([^\(\)]+\)$/gm
// Matches all links that use some kind of protocol (e.g. http://, https://, mailto:, etc.)
const nonInternalLinkRegex = /^(?:[a-z+]+:)?\/\/|^[a-z]+:/i;

Expand Down

0 comments on commit 8cc6035

Please sign in to comment.