Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 <[email protected]>
Reviewed-By: Ben Coe <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott committed Sep 15, 2020
commit 26e660f9627f776678106d0afa7da428c44c45cf
4 changes: 2 additions & 2 deletions doc/api/repl.md
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ For an example of running a "full-featured" (`terminal`) REPL over
a `net.Server` and `net.Socket` instance, see:
<https://gist.github.com/TooTallNate/2209310>.

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

[ZSH]: https://en.wikipedia.org/wiki/Z_shell
Expand All @@ -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
4 changes: 0 additions & 4 deletions tools/doc/html.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)".
Expand All @@ -143,9 +142,6 @@ function linkManPages(text) {
return `${beginning}<a href="https://www.freebsd.org/cgi/man.cgi` +
`?query=${name}&sektion=${number}">${displayAs}</a>`;
}
if (HAXX_ONLY_SYSCALLS.has(name)) {
return `${beginning}<a href="https://${name}.haxx.se/docs/manpage.html">${displayAs}</a>`;
}

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