Skip to content

Commit

Permalink
fix(curriculum): don't flag curriclum links (#10763)
Browse files Browse the repository at this point in the history
  • Loading branch information
fiji-flo authored Mar 21, 2024
1 parent 08848b8 commit 6d989e4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build/flaws/broken-links.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ export function getBrokenLinksFlaws(
// links in our content but that's a reality of MDN being 15+ years old.
} else if (
href.startsWith("https://developer.mozilla.org/") &&
!href.startsWith("https://developer.mozilla.org/en-US/curriculum/") &&
!href.startsWith("https://developer.mozilla.org/en-US/blog/")
) {
// It might be a working 200 OK link but the link just shouldn't
Expand Down Expand Up @@ -283,7 +284,7 @@ export function getBrokenLinksFlaws(
} else if (
href.startsWith("/") &&
!href.startsWith("//") &&
!/^\/(discord|en-US\/blog)(\/|$)/.test(href)
!/^\/(discord|en-US\/(blog|curriculum))(\/|$)/.test(href)
) {
// Got to fake the domain to sensible extract the .search and .hash
const absoluteURL = new URL(href, "http://www.example.com");
Expand Down

0 comments on commit 6d989e4

Please sign in to comment.