Skip to content

Commit ea1641d

Browse files
Trottjoesepi
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: nodejs#35174 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Coe <bencoe@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent d3be066 commit ea1641d

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
@@ -745,7 +745,7 @@ For an example of running a "full-featured" (`terminal`) REPL over
745745
a `net.Server` and `net.Socket` instance, see:
746746
<https://gist.github.com/TooTallNate/2209310>.
747747

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

751751
[ZSH]: https://en.wikipedia.org/wiki/Z_shell
@@ -761,5 +761,5 @@ For an example of running a REPL instance over [curl(1)][], see:
761761
[`util.inspect()`]: util.html#util_util_inspect_object_options
762762
[`reverse-i-search`]: #repl_reverse_i_search
763763
[TTY keybindings]: readline.html#readline_tty_keybindings
764-
[curl(1)]: https://curl.haxx.se/docs/manpage.html
764+
[`curl(1)`]: https://curl.haxx.se/docs/manpage.html
765765
[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)