Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8781bcb

Browse filesBrowse files
vsemozhetbytMylesBorins
authored andcommitted
tools, doc: wrap manpage links in code elements
PR-URL: #20785 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 04f7678 commit 8781bcb
Copy full SHA for 8781bcb

File tree

Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+6
-6
lines changed
Open diff view settings
Collapse file

‎test/doctool/test-doctool-html.js‎

Copy file name to clipboardExpand all lines: test/doctool/test-doctool-html.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ const testData = [
5252
'<tr><td>v4.2.0</td><td><p>The <code>error</code> parameter can now be' +
5353
'an arrow function.</p></td></tr></table></details></div> ' +
5454
'<p>Describe <code>Foobar II</code> in more detail here.' +
55-
'<a href="http://man7.org/linux/man-pages/man1/fg.1.html">fg(1)</a></p>' +
56-
'<h2>Deprecated thingy<span><a class="mark" ' +
55+
'<a href="http://man7.org/linux/man-pages/man1/fg.1.html"><code>fg(1)' +
56+
'</code></a></p><h2>Deprecated thingy<span><a class="mark" ' +
5757
'href="#foo_deprecated_thingy" id="foo_deprecated_thingy">#</a>' +
5858
'</span></h2><div class="api_metadata"><span>Added in: v1.0.0</span>' +
5959
'<span>Deprecated since: v2.0.0</span></div><p>Describe ' +
6060
'<code>Deprecated thingy</code> in more detail here.' +
61-
'<a href="http://man7.org/linux/man-pages/man1/fg.1p.html">fg(1p)</a>' +
62-
'</p><h2>Something<span><a class="mark" href="#foo_something" ' +
63-
'id="foo_something">#</a></span></h2> ' +
61+
'<a href="http://man7.org/linux/man-pages/man1/fg.1p.html"><code>fg(1p)' +
62+
'</code></a></p><h2>Something<span><a class="mark" href="#foo_something' +
63+
'" id="foo_something">#</a></span></h2> ' +
6464
'<!-- This is not a metadata comment --> ' +
6565
'<p>Describe <code>Something</code> in more detail here. </p>'
6666
},
Collapse file

‎tools/doc/html.js‎

Copy file name to clipboardExpand all lines: tools/doc/html.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function linkManPages(text) {
141141
MAN_PAGE, (match, beginning, name, number, optionalCharacter) => {
142142
// Name consists of lowercase letters,
143143
// number is a single digit with an optional lowercase letter.
144-
const displayAs = `${name}(${number}${optionalCharacter})`;
144+
const displayAs = `<code>${name}(${number}${optionalCharacter})</code>`;
145145

146146
if (BSD_ONLY_SYSCALLS.has(name)) {
147147
return `${beginning}<a href="https://www.freebsd.org/cgi/man.cgi` +

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.