From 26e660f9627f776678106d0afa7da428c44c45cf Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 13 Sep 2020 08:59:55 -0700 Subject: [PATCH] doc: remove problematic auto-linking of curl man pages The only instance of curl man page linking is in repl.md and it is explicit. The magic autolinking in html.js creates a superfluous empty link. Remove it. Before, two adjacent links generated, with the first one having no text: ```html curl(1) ``` After, just one link: ```html curl(1) ``` PR-URL: https://github.com/nodejs/node/pull/35174 Reviewed-By: Anna Henningsen Reviewed-By: Ben Coe Reviewed-By: Luigi Pinca --- doc/api/repl.md | 4 ++-- tools/doc/html.js | 4 ---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/doc/api/repl.md b/doc/api/repl.md index 953d66e79fe9a1..3d343ad18a058d 100644 --- a/doc/api/repl.md +++ b/doc/api/repl.md @@ -745,7 +745,7 @@ For an example of running a "full-featured" (`terminal`) REPL over a `net.Server` and `net.Socket` instance, see: . -For an example of running a REPL instance over [curl(1)][], see: +For an example of running a REPL instance over [`curl(1)`][], see: . [ZSH]: https://en.wikipedia.org/wiki/Z_shell @@ -761,5 +761,5 @@ For an example of running a REPL instance over [curl(1)][], see: [`util.inspect()`]: util.html#util_util_inspect_object_options [`reverse-i-search`]: #repl_reverse_i_search [TTY keybindings]: readline.html#readline_tty_keybindings -[curl(1)]: https://curl.haxx.se/docs/manpage.html +[`curl(1)`]: https://curl.haxx.se/docs/manpage.html [stream]: stream.html diff --git a/tools/doc/html.js b/tools/doc/html.js index ae8c1b10ddad7a..cbed8ba6b2d8ef 100644 --- a/tools/doc/html.js +++ b/tools/doc/html.js @@ -126,7 +126,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 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)". @@ -143,9 +142,6 @@ function linkManPages(text) { return `${beginning}${displayAs}`; } - if (HAXX_ONLY_SYSCALLS.has(name)) { - return `${beginning}${displayAs}`; - } return `${beginning}${displayAs}`;