Skip to content

Commit

Permalink
doc,tools: remove malfunctioning Linux manpage linker
Browse files Browse the repository at this point in the history
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 <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Mary Marchini <oss@mmarchini.me>
  • Loading branch information
Trott authored and richardlau committed Sep 2, 2020
1 parent 932ca26 commit 09369a0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
12 changes: 6 additions & 6 deletions doc/api/os.md
Expand Up @@ -291,7 +291,7 @@ added: v0.3.3
Returns the operating system as a string.

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

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

* Returns: {string}

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

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

## `os.uptime()`
<!-- YAML
Expand Down Expand Up @@ -401,8 +401,8 @@ added: v13.11.0
Returns a string identifying the kernel version.

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

## OS constants
Expand Down Expand Up @@ -1270,6 +1270,6 @@ The following process scheduling constants are exported by
[`SystemError`]: errors.html#errors_class_systemerror
[`process.arch`]: process.html#process_process_arch
[`process.platform`]: process.html#process_process_platform
[`uname(3)`]: https://linux.die.net/man/3/uname
[Android building]: https://github.com/nodejs/node/blob/master/BUILDING.md#androidandroid-based-devices-eg-firefox-os
[EUID]: https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID
[uname(3)]: https://linux.die.net/man/3/uname
5 changes: 0 additions & 5 deletions tools/doc/html.js
Expand Up @@ -124,7 +124,6 @@ function preprocessText({ nodeVersion }) {

// 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;

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

0 comments on commit 09369a0

Please sign in to comment.