Skip to content

Commit 52be37c

Browse files
Trottrichardlau
authored andcommitted
doc,tools: remove malfunctioning Linux manpage linker
The Linux manpage auto-linking is resulting in extraneous links with empty text in the docs. Remove it as the only thing it affects is linked explicitly in the one document that uses it. PR-URL: #34985 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Mary Marchini <[email protected]>
1 parent 2ab33c5 commit 52be37c

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

doc/api/os.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ added: v0.3.3
291291
Returns the operating system as a string.
292292

293293
On POSIX systems, the operating system release is determined by calling
294-
[uname(3)][]. On Windows, `GetVersionExW()` is used. See
294+
[`uname(3)`][]. On Windows, `GetVersionExW()` is used. See
295295
<https://en.wikipedia.org/wiki/Uname#Examples> for more information.
296296

297297
## `os.setPriority([pid, ]priority)`
@@ -348,11 +348,11 @@ added: v0.3.3
348348

349349
* Returns: {string}
350350

351-
Returns the operating system name as returned by [uname(3)][]. For example, it
351+
Returns the operating system name as returned by [`uname(3)`][]. For example, it
352352
returns `'Linux'` on Linux, `'Darwin'` on macOS, and `'Windows_NT'` on Windows.
353353

354354
See <https://en.wikipedia.org/wiki/Uname#Examples> for additional information
355-
about the output of running [uname(3)][] on various operating systems.
355+
about the output of running [`uname(3)`][] on various operating systems.
356356

357357
## `os.uptime()`
358358
<!-- YAML
@@ -401,8 +401,8 @@ added: v13.11.0
401401
Returns a string identifying the kernel version.
402402

403403
On POSIX systems, the operating system release is determined by calling
404-
[uname(3)][]. On Windows, `RtlGetVersion()` is used, and if it is not available,
405-
`GetVersionExW()` will be used. See
404+
[`uname(3)`][]. On Windows, `RtlGetVersion()` is used, and if it is not
405+
available, `GetVersionExW()` will be used. See
406406
<https://en.wikipedia.org/wiki/Uname#Examples> for more information.
407407

408408
## OS constants
@@ -1270,6 +1270,6 @@ The following process scheduling constants are exported by
12701270
[`SystemError`]: errors.html#errors_class_systemerror
12711271
[`process.arch`]: process.html#process_process_arch
12721272
[`process.platform`]: process.html#process_process_platform
1273+
[`uname(3)`]: https://linux.die.net/man/3/uname
12731274
[Android building]: https://github.com/nodejs/node/blob/master/BUILDING.md#androidandroid-based-devices-eg-firefox-os
12741275
[EUID]: https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID
1275-
[uname(3)]: https://linux.die.net/man/3/uname

tools/doc/html.js

-5
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ function preprocessText({ nodeVersion }) {
124124

125125
// Syscalls which appear in the docs, but which only exist in BSD / macOS.
126126
const BSD_ONLY_SYSCALLS = new Set(['lchmod']);
127-
const LINUX_DIE_ONLY_SYSCALLS = new Set(['uname']);
128127
const HAXX_ONLY_SYSCALLS = new Set(['curl']);
129128
const MAN_PAGE = /(^|\s)([a-z.]+)\((\d)([a-z]?)\)/gm;
130129

@@ -142,10 +141,6 @@ function linkManPages(text) {
142141
return `${beginning}<a href="https://www.freebsd.org/cgi/man.cgi` +
143142
`?query=${name}&sektion=${number}">${displayAs}</a>`;
144143
}
145-
if (LINUX_DIE_ONLY_SYSCALLS.has(name)) {
146-
return `${beginning}<a href="https://linux.die.net/man/` +
147-
`${number}/${name}">${displayAs}</a>`;
148-
}
149144
if (HAXX_ONLY_SYSCALLS.has(name)) {
150145
return `${beginning}<a href="https://${name}.haxx.se/docs/manpage.html">${displayAs}</a>`;
151146
}

0 commit comments

Comments
 (0)