Skip to content

Commit

Permalink
fix-link: move out fake mdn links
Browse files Browse the repository at this point in the history
  • Loading branch information
myfreeer committed May 2, 2024
1 parent a50301a commit 7493d62
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/nodejs-cn/fix-link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ const getRedirectLocation = async (
.replace(new RegExp(`${URL_PREFIX}/api/v\\d\\d/`),
`${URL_PREFIX}/${options.meta.nodeApiPath}/`);
}
// fake mdn links
link = link.replace('https://web.nodejs.cn/', 'https://developer.mozilla.org/');
return link;
};

Expand Down
2 changes: 2 additions & 0 deletions src/nodejs-cn/life-cycle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ const linkRedirectFunc = async (
u = u.path(redirect[u.path()]);
link = u.toString();
}
// fake mdn links
link = link.replace('https://web.nodejs.cn/', 'https://developer.mozilla.org/');
return link;
};

Expand Down

0 comments on commit 7493d62

Please sign in to comment.