Skip to content

Commit eb172fe

Browse files
AlhadisFishrock123
authored andcommitted
doc: Clean up roff source in manpage
* The header's comments were written incorrectly. A comment line in Roff starts with a .\" sequence, whereas .\ is attempting to call a command whose name starts with a space. Because Roff interpreters will discard unrecognised control lines, the malformed "comments" were just noops. * Repeating font macros have been used to format the synopsis instead of escape sequences (\fB…\fR). This makes for admittedly more sustainable source code for an editor who lacks knowledge of Roff. * A basic macro has been added to insert highlighted URLs with less line noise. To insert a bold and underlined URL on a new line, one only has to write ".ur http://…" PR-URL: #7819 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 4a87abb commit eb172fe

File tree

1 file changed

+47
-16
lines changed

1 file changed

+47
-16
lines changed

doc/node.1

+47-16
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
.TH NODE 1 2016 Node.js Node.js
22

3-
.\ This is a man page comment.
4-
.\ Man page syntax (actually troff syntax) is somewhat obscure, but the
5-
.\ important part is is that .<letter> specifies <letter>'s syntax for that
6-
.\ line, and \f<letter> specifies it for the characters that follow.
7-
.\ See http://liw.fi/manpages/ for more info.
3+
.\" This is a man page comment.
4+
5+
.\" Man page syntax (actually roff syntax) is somewhat obscure, but the
6+
.\" important part is is that .<letter> specifies <letter>'s syntax for that
7+
.\" line, and \f<letter> specifies it for the characters that follow.
8+
9+
.\" .B Bold line
10+
.\" .I Italic line (Rendered as underlined text in terminals)
11+
.\" .BI Alternating bold/italics without spaces between arguments.
12+
.\" Use `\ ` to include an "unpaddable" (literal) space in the output.
13+
.\" .RI Alternating roman/italic
14+
15+
.\" See http://liw.fi/manpages/ for an overview, or http://www.troff.org/54.pdf
16+
.\" for detailed language reference.
17+
18+
.\" Macro to display an underlined URL in bold
19+
.de ur
20+
.nr CF \\n(.f
21+
.ft 4
22+
\\$1
23+
.ft \\n(CF
24+
..
25+
826

927
.SH NAME
1028

@@ -14,15 +32,22 @@ node \- Server-side JavaScript runtime
1432
.SH SYNOPSIS
1533

1634
.B node
17-
[\fIoptions\fR] [\fIv8 options\fR]
18-
[\fIscript.js\fR | \fB\-e \fR"\fIscript\fR"]
19-
[\fIarguments\fR]
35+
.RI [ options ]
36+
.RI [ v8\ options ]
37+
.RI [ script.js \ |
38+
.B -e
39+
.RI \&" script \&"]
40+
.RI [ arguments ]
2041
.br
2142
.B node debug
22-
[\fIscript.js\fR | \fB\-e \fR"\fIscript\fR" | \fI<host>:<port>\fR] \fI...
43+
.RI [ script.js " | "
44+
.B \-e
45+
.RI \&" script \&"\ |
46+
.IR <host>:<port> ]
47+
.I ...
2348
.br
2449
.B node
25-
[\fB\-\-v8-options\fR]
50+
.RB [ \-\-v8-options ]
2651

2752
Execute without arguments to start the REPL.
2853

@@ -172,14 +197,20 @@ value to an empty string ("" or " ") disables persistent REPL history.
172197

173198
.SH RESOURCES AND DOCUMENTATION
174199

175-
Website: \fBhttps://nodejs.org/\fR
200+
Website:
201+
.ur https://nodejs.org/
176202

177-
Documentation: \fBhttps://nodejs.org/api/\fR
203+
Documentation:
204+
.ur https://nodejs.org/api/
178205

179-
GitHub repository & Issue Tracker: \fBhttps://github.com/nodejs/node\fR
206+
GitHub repository & Issue Tracker:
207+
.ur https://github.com/nodejs/node
180208

181-
Mailing list: \fBhttp://groups.google.com/group/nodejs\fR
209+
Mailing list:
210+
.ur http://groups.google.com/group/nodejs
182211

183-
IRC (general questions): \fBchat.freenode.net #node.js\fR
212+
IRC (general questions):
213+
.ur "chat.freenode.net #node.js"
184214

185-
IRC (node core development): \fBchat.freenode.net #node-dev\fR
215+
IRC (node core development):
216+
.ur "chat.freenode.net #node-dev"

0 commit comments

Comments
 (0)