From 964174e339b4440923deee2ebec3872d4f89f160 Mon Sep 17 00:00:00 2001 From: Gerson NiƱo Date: Tue, 9 Apr 2019 22:30:03 -0500 Subject: tools,doc: fix 404 broken links in docs Change the `linkManPages()` function to catch the `uname` and `curl` correct websites on the docs page. PR-URL: https://github.com/nodejs/node/pull/27168 Fixes: https://github.com/nodejs/node/issues/26074 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- tools/doc/html.js | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tools/doc') diff --git a/tools/doc/html.js b/tools/doc/html.js index c7ffb392e0..510e2b08d2 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -120,6 +120,8 @@ function preprocessText() { // Syscalls which appear in the docs, but which only exist in BSD / macOS. const BSD_ONLY_SYSCALLS = new Set(['lchmod']); +const LINUX_DIE_ONLY_SYSCALLS = new Set(['uname']); +const HAXX_ONLY_SYSCALLS = new Set(['curl']); const MAN_PAGE = /(^|\s)([a-z.]+)\((\d)([a-z]?)\)/gm; // Handle references to man pages, eg "open(2)" or "lchmod(2)". @@ -136,6 +138,14 @@ function linkManPages(text) { return `${beginning}${displayAs}`; } + if (LINUX_DIE_ONLY_SYSCALLS.has(name)) { + return `${beginning}${displayAs}`; + } + if (HAXX_ONLY_SYSCALLS.has(name)) { + return `${beginning}${displayAs}`; + } + return `${beginning}${displayAs}`; }); -- cgit v1.2.3