doc: various documentation formatting fixes · nodejs/node@0ffeddb · GitHub
Skip to content

Commit 0ffeddb

Browse files
ChALkeRcjihrig
authored andcommitted
doc: various documentation formatting fixes
* Fix markdown code sample in releases.md, it was <a id="x.y.x></a>" * Fix some markdown errors, e.g. in changelogs * Fix broken defs links, e.g. in domain-postmortem.md * Fix other broken refs, by addaleax * Add links to some defs that were present but not linked to * Remove dead defs * Move defs to the bottom (one file affected) * Add language indicators to all code blocks, using `txt` when no specific language could be chosen * Some minor formatting changes (spaces, ident, headings) PR-URL: #7637 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Roman Reiss <me@silverwind.io> Conflicts: doc/api/zlib.md doc/changelogs/CHANGELOG_V4.md
1 parent 51a2041 commit 0ffeddb

36 files changed

Lines changed: 344 additions & 143 deletions

doc/api/addons.md

Lines changed: 6 additions & 6 deletions

doc/api/buffer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ significant impact* on performance. Use of the `--zero-fill-buffers` option is
114114
recommended only when absolutely necessary to enforce that newly allocated
115115
`Buffer` instances cannot contain potentially sensitive data.
116116

117-
```
117+
```txt
118118
$ node --zero-fill-buffers
119119
> Buffer.allocUnsafe(5);
120120
<Buffer 00 00 00 00 00>

doc/api/cluster.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ if (cluster.isMaster) {
3535

3636
Running Node.js will now share port 8000 between the workers:
3737

38-
```
38+
```txt
3939
$ NODE_DEBUG=cluster node server.js
4040
23521,Master Worker 23524 online
4141
23521,Master Worker 23526 online

doc/api/debugger.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ via a simple [TCP-based protocol][] and built-in debugging client. To use it,
99
start Node.js with the `debug` argument followed by the path to the script to
1010
debug; a prompt will be displayed indicating successful launch of the debugger:
1111

12-
```
12+
```txt
1313
$ node debug myscript.js
1414
< debugger listening on port 5858
1515
connecting... ok
@@ -38,7 +38,7 @@ console.log('hello');
3838

3939
Once the debugger is run, a breakpoint will occur at line 4:
4040

41-
```
41+
```txt
4242
$ node debug myscript.js
4343
< debugger listening on port 5858
4444
connecting... ok
@@ -119,7 +119,7 @@ on line 1
119119
It is also possible to set a breakpoint in a file (module) that
120120
isn't loaded yet:
121121

122-
```
122+
```txt
123123
$ ./node debug test/fixtures/break-in-module/main.js
124124
< debugger listening on port 5858
125125
connecting to port 5858... ok

doc/api/dgram.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,6 @@ and `udp6` sockets). The bound address and port can be retrieved using
425425
[`EventEmitter`]: events.html
426426
[`Buffer`]: buffer.html
427427
[`'close'`]: #dgram_event_close
428-
[`addMembership()`]: #dgram_socket_addmembership_multicastaddress_multicastinterface
429428
[`close()`]: #dgram_socket_close_callback
430429
[`dgram.createSocket()`]: #dgram_dgram_createsocket_options_callback
431430
[`dgram.Socket#bind()`]: #dgram_socket_bind_options_callback

doc/api/dns.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Alternatively, `options` can be an object containing these properties:
8686

8787
All properties are optional. An example usage of options is shown below.
8888

89-
```
89+
```js
9090
{
9191
family: 4,
9292
hints: dns.ADDRCONFIG | dns.V4MAPPED,
@@ -279,7 +279,7 @@ be an object with the following properties:
279279
* `expire`
280280
* `minttl`
281281

282-
```
282+
```js
283283
{
284284
nsname: 'ns.example.com',
285285
hostmaster: 'root.example.com',
@@ -305,7 +305,7 @@ be an array of objects with the following properties:
305305
* `port`
306306
* `name`
307307

308-
```
308+
```js
309309
{
310310
priority: 10,
311311
weight: 5,
@@ -437,8 +437,6 @@ uses. For instance, _they do not use the configuration from `/etc/hosts`_.
437437

438438
[DNS error codes]: #dns_error_codes
439439
[`dns.lookup()`]: #dns_dns_lookup_hostname_options_callback
440-
[`dns.resolve()`]: #dns_dns_resolve_hostname_rrtype_callback
441-
[`dns.resolve4()`]: #dns_dns_resolve4_hostname_callback
442440
[`dns.resolveSoa()`]: #dns_dns_resolvesoa_hostname_callback
443441
[`Error`]: errors.html#errors_class_error
444442
[Implementation considerations section]: #dns_implementation_considerations

doc/api/documentation.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,26 @@ and in the process of being redesigned.
3737

3838
The stability indices are as follows:
3939

40-
```
40+
```txt
4141
Stability: 0 - Deprecated
4242
This feature is known to be problematic, and changes are
4343
planned. Do not rely on it. Use of the feature may cause warnings. Backwards
4444
compatibility should not be expected.
4545
```
4646

47-
```
47+
```txt
4848
Stability: 1 - Experimental
4949
This feature is subject to change, and is gated by a command line flag.
5050
It may change or be removed in future versions.
5151
```
5252

53-
```
53+
```txt
5454
Stability: 2 - Stable
5555
The API has proven satisfactory. Compatibility with the npm ecosystem
5656
is a high priority, and will not be broken unless absolutely necessary.
5757
```
5858

59-
```
59+
```txt
6060
Stability: 3 - Locked
6161
Only fixes related to security, performance, or bug fixes will be accepted.
6262
Please do not suggest API changes in this area; they will be refused.

doc/api/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ instantiated.
268268

269269
For example:
270270

271-
```
271+
```txt
272272
Error: Things keep happening!
273273
at /home/gbusey/file.js:525:2
274274
at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21)

doc/api/fs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ Most fs functions let you omit the callback argument. If you do, a default
7474
callback is used that rethrows errors. To get a trace to the original call
7575
site, set the `NODE_DEBUG` environment variable:
7676

77-
```
77+
```txt
7878
$ cat script.js
7979
function bad() {
8080
require('fs').readFile('/');

doc/api/globals.md

Lines changed: 3 additions & 3 deletions

0 commit comments

Comments
 (0)