Skip to content

Commit 066148d

Browse files
Trottruyadorno
authored andcommitted
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 <a href="https://curl.haxx.se/docs/manpage.html"></a> <a href="https://curl.haxx.se/docs/manpage.html"><code>curl(1)</code></a> ``` After, just one link: ```html <a href="https://curl.haxx.se/docs/manpage.html"><code>curl(1)</code></a> ``` PR-URL: #35174 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 0a97f44 commit 066148d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

doc/api/repl.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ For an example of running a "full-featured" (`terminal`) REPL over
741741
a `net.Server` and `net.Socket` instance, see:
742742
<https://gist.github.com/TooTallNate/2209310>.
743743

744-
For an example of running a REPL instance over [curl(1)][], see:
744+
For an example of running a REPL instance over [`curl(1)`][], see:
745745
<https://gist.github.com/TooTallNate/2053342>.
746746

747747
[ZSH]: https://en.wikipedia.org/wiki/Z_shell
@@ -757,5 +757,5 @@ For an example of running a REPL instance over [curl(1)][], see:
757757
[`util.inspect()`]: util.html#util_util_inspect_object_options
758758
[`reverse-i-search`]: #repl_reverse_i_search
759759
[TTY keybindings]: readline.html#readline_tty_keybindings
760-
[curl(1)]: https://curl.haxx.se/docs/manpage.html
760+
[`curl(1)`]: https://curl.haxx.se/docs/manpage.html
761761
[stream]: stream.html

tools/doc/html.js

-4
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ function preprocessText({ nodeVersion }) {
126126

127127
// Syscalls which appear in the docs, but which only exist in BSD / macOS.
128128
const BSD_ONLY_SYSCALLS = new Set(['lchmod']);
129-
const HAXX_ONLY_SYSCALLS = new Set(['curl']);
130129
const MAN_PAGE = /(^|\s)([a-z.]+)\((\d)([a-z]?)\)/gm;
131130

132131
// Handle references to man pages, eg "open(2)" or "lchmod(2)".
@@ -143,9 +142,6 @@ function linkManPages(text) {
143142
return `${beginning}<a href="https://www.freebsd.org/cgi/man.cgi` +
144143
`?query=${name}&sektion=${number}">${displayAs}</a>`;
145144
}
146-
if (HAXX_ONLY_SYSCALLS.has(name)) {
147-
return `${beginning}<a href="https://${name}.haxx.se/docs/manpage.html">${displayAs}</a>`;
148-
}
149145

150146
return `${beginning}<a href="http://man7.org/linux/man-pages/man${number}` +
151147
`/${name}.${number}${optionalCharacter}.html">${displayAs}</a>`;

0 commit comments

Comments
 (0)