Skip to content

Commit a5c2154

Browse files
nschonniBridgeAR
authored andcommitted
doc: add explicit bracket for markdown reference links
Use explicit trailing `[]` for reference markdown links to prevent implicit links when references are added to documents. PR-URL: #29808 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent b2cce13 commit a5c2154

17 files changed

+92
-90
lines changed

doc/api/assert.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ All instances contain the built-in `Error` properties (`message` and `name`)
3434
and:
3535

3636
* `actual` {any} Set to the `actual` argument for methods such as
37-
[`assert.strictEqual()`].
37+
[`assert.strictEqual()`][].
3838
* `expected` {any} Set to the `expected` value for methods such as
39-
[`assert.strictEqual()`].
39+
[`assert.strictEqual()`][].
4040
* `generatedMessage` {boolean} Indicates if the message was auto-generated
4141
(`true`) or not.
4242
* `code` {string} Value is always `ERR_ASSERTION` to show that the error is an
@@ -638,7 +638,7 @@ If `message` is falsy, the error message is set as the values of `actual` and
638638
`message` is provided as third argument it will be used as the error message and
639639
the other arguments will be stored as properties on the thrown object. If
640640
`stackStartFn` is provided, all stack frames above that function will be
641-
removed from stacktrace (see [`Error.captureStackTrace`]). If no arguments are
641+
removed from stacktrace (see [`Error.captureStackTrace`][]). If no arguments are
642642
given, the default message `Failed` will be used.
643643

644644
```js

doc/api/crypto.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ and Ed448 are currently supported.
20762076

20772077
If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
20782078
behaves as if [`keyObject.export()`][] had been called on its result. Otherwise,
2079-
the respective part of the key is returned as a [`KeyObject`].
2079+
the respective part of the key is returned as a [`KeyObject`][].
20802080

20812081
It is recommended to encode public keys as `'spki'` and private keys as
20822082
`'pkcs8'` with encryption for long-term storage:
@@ -2136,7 +2136,7 @@ and Ed448 are currently supported.
21362136

21372137
If a `publicKeyEncoding` or `privateKeyEncoding` was specified, this function
21382138
behaves as if [`keyObject.export()`][] had been called on its result. Otherwise,
2139-
the respective part of the key is returned as a [`KeyObject`].
2139+
the respective part of the key is returned as a [`KeyObject`][].
21402140

21412141
When encoding public keys, it is recommended to use `'spki'`. When encoding
21422142
private keys, it is recommended to use `'pks8'` with a strong passphrase, and to

doc/api/deprecations.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2505,8 +2505,8 @@ changes:
25052505
25062506
Type: Documentation-only
25072507
2508-
Prefer [`response.socket`][] over [`response.connection`] and
2509-
[`request.socket`][] over [`request.connection`].
2508+
Prefer [`response.socket`][] over [`response.connection`][] and
2509+
[`request.socket`][] over [`request.connection`][].
25102510
25112511
<a id="DEP0134"></a>
25122512
### DEP0134: process._tickCallback

doc/api/errors.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ system error.
461461

462462
The `error.errno` property is a number or a string. If it is a number, it is a
463463
negative value which corresponds to the error code defined in
464-
[`libuv Error handling`]. See the libuv `errno.h` header file
464+
[`libuv Error handling`][]. See the libuv `errno.h` header file
465465
(`deps/uv/include/uv/errno.h` in the Node.js source tree) for details. In case
466466
of a string, it is the same as `error.code`.
467467

@@ -1283,8 +1283,8 @@ semantics for determining whether a path can be used is platform-dependent.
12831283
### ERR_INVALID_HANDLE_TYPE
12841284

12851285
An attempt was made to send an unsupported "handle" over an IPC communication
1286-
channel to a child process. See [`subprocess.send()`] and [`process.send()`] for
1287-
more information.
1286+
channel to a child process. See [`subprocess.send()`][] and [`process.send()`][]
1287+
for more information.
12881288

12891289
<a id="ERR_INVALID_HTTP_TOKEN"></a>
12901290
### ERR_INVALID_HTTP_TOKEN
@@ -1436,36 +1436,36 @@ for more information.
14361436
### ERR_MANIFEST_ASSERT_INTEGRITY
14371437

14381438
An attempt was made to load a resource, but the resource did not match the
1439-
integrity defined by the policy manifest. See the documentation for [policy]
1439+
integrity defined by the policy manifest. See the documentation for [policy][]
14401440
manifests for more information.
14411441

14421442
<a id="ERR_MANIFEST_DEPENDENCY_MISSING"></a>
14431443
### ERR_MANIFEST_DEPENDENCY_MISSING
14441444

14451445
An attempt was made to load a resource, but the resource was not listed as a
14461446
dependency from the location that attempted to load it. See the documentation
1447-
for [policy] manifests for more information.
1447+
for [policy][] manifests for more information.
14481448

14491449
<a id="ERR_MANIFEST_INTEGRITY_MISMATCH"></a>
14501450
### ERR_MANIFEST_INTEGRITY_MISMATCH
14511451

14521452
An attempt was made to load a policy manifest, but the manifest had multiple
14531453
entries for a resource which did not match each other. Update the manifest
14541454
entries to match in order to resolve this error. See the documentation for
1455-
[policy] manifests for more information.
1455+
[policy][] manifests for more information.
14561456

14571457
<a id="ERR_MANIFEST_INVALID_RESOURCE_FIELD"></a>
14581458
### ERR_MANIFEST_INVALID_RESOURCE_FIELD
14591459

14601460
A policy manifest resource had an invalid value for one of its fields. Update
14611461
the manifest entry to match in order to resolve this error. See the
1462-
documentation for [policy] manifests for more information.
1462+
documentation for [policy][] manifests for more information.
14631463

14641464
<a id="ERR_MANIFEST_PARSE_POLICY"></a>
14651465
### ERR_MANIFEST_PARSE_POLICY
14661466

14671467
An attempt was made to load a policy manifest, but the manifest was unable to
1468-
be parsed. See the documentation for [policy] manifests for more information.
1468+
be parsed. See the documentation for [policy][] manifests for more information.
14691469

14701470
<a id="ERR_MANIFEST_TDZ"></a>
14711471
### ERR_MANIFEST_TDZ
@@ -1477,7 +1477,7 @@ initialization has not yet taken place. This is likely a bug in Node.js.
14771477
### ERR_MANIFEST_UNKNOWN_ONERROR
14781478

14791479
A policy manifest was loaded, but had an unknown value for its "onerror"
1480-
behavior. See the documentation for [policy] manifests for more information.
1480+
behavior. See the documentation for [policy][] manifests for more information.
14811481

14821482
<a id="ERR_MEMORY_ALLOCATION_FAILED"></a>
14831483
### ERR_MEMORY_ALLOCATION_FAILED

doc/api/fs.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -3133,7 +3133,7 @@ Using `fs.stat()` to check for the existence of a file before calling
31333133
Instead, user code should open/read/write the file directly and handle the
31343134
error raised if the file is not available.
31353135

3136-
To check if a file exists without manipulating it afterwards, [`fs.access()`]
3136+
To check if a file exists without manipulating it afterwards, [`fs.access()`][]
31373137
is recommended.
31383138

31393139
For example, given the following folder structure:
@@ -3541,12 +3541,13 @@ The recursive option is only supported on macOS and Windows.
35413541
This feature depends on the underlying operating system providing a way
35423542
to be notified of filesystem changes.
35433543

3544-
* On Linux systems, this uses [`inotify(7)`].
3545-
* On BSD systems, this uses [`kqueue(2)`].
3546-
* On macOS, this uses [`kqueue(2)`] for files and [`FSEvents`] for directories.
3547-
* On SunOS systems (including Solaris and SmartOS), this uses [`event ports`].
3548-
* On Windows systems, this feature depends on [`ReadDirectoryChangesW`].
3549-
* On Aix systems, this feature depends on [`AHAFS`], which must be enabled.
3544+
* On Linux systems, this uses [`inotify(7)`][].
3545+
* On BSD systems, this uses [`kqueue(2)`][].
3546+
* On macOS, this uses [`kqueue(2)`][] for files and [`FSEvents`][] for
3547+
directories.
3548+
* On SunOS systems (including Solaris and SmartOS), this uses [`event ports`][].
3549+
* On Windows systems, this feature depends on [`ReadDirectoryChangesW`][].
3550+
* On Aix systems, this feature depends on [`AHAFS`][], which must be enabled.
35503551

35513552
If the underlying functionality is not available for some reason, then
35523553
`fs.watch` will not be able to function. For example, watching files or

doc/api/globals.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ Used to handle binary data. See the [buffer section][].
3030

3131
## \_\_dirname
3232

33-
This variable may appear to be global but is not. See [`__dirname`].
33+
This variable may appear to be global but is not. See [`__dirname`][].
3434

3535
## \_\_filename
3636

37-
This variable may appear to be global but is not. See [`__filename`].
37+
This variable may appear to be global but is not. See [`__filename`][].
3838

3939
## clearImmediate(immediateObject)
4040
<!-- YAML
@@ -43,7 +43,7 @@ added: v0.9.1
4343

4444
<!--type=global-->
4545

46-
[`clearImmediate`] is described in the [timers][] section.
46+
[`clearImmediate`][] is described in the [timers][] section.
4747

4848
## clearInterval(intervalObject)
4949
<!-- YAML
@@ -52,7 +52,7 @@ added: v0.0.1
5252

5353
<!--type=global-->
5454

55-
[`clearInterval`] is described in the [timers][] section.
55+
[`clearInterval`][] is described in the [timers][] section.
5656

5757
## clearTimeout(timeoutObject)
5858
<!-- YAML
@@ -61,7 +61,7 @@ added: v0.0.1
6161

6262
<!--type=global-->
6363

64-
[`clearTimeout`] is described in the [timers][] section.
64+
[`clearTimeout`][] is described in the [timers][] section.
6565

6666
## console
6767
<!-- YAML
@@ -76,7 +76,7 @@ Used to print to stdout and stderr. See the [`console`][] section.
7676

7777
## exports
7878

79-
This variable may appear to be global but is not. See [`exports`].
79+
This variable may appear to be global but is not. See [`exports`][].
8080

8181
## global
8282
<!-- YAML
@@ -94,7 +94,7 @@ Node.js this is different. The top-level scope is not the global scope;
9494

9595
## module
9696

97-
This variable may appear to be global but is not. See [`module`].
97+
This variable may appear to be global but is not. See [`module`][].
9898

9999
## process
100100
<!-- YAML
@@ -148,7 +148,7 @@ DataHandler.prototype.load = async function load(key) {
148148

149149
## require()
150150

151-
This variable may appear to be global but is not. See [`require()`].
151+
This variable may appear to be global but is not. See [`require()`][].
152152

153153
## setImmediate(callback[, ...args])
154154
<!-- YAML
@@ -157,7 +157,7 @@ added: v0.9.1
157157

158158
<!-- type=global -->
159159

160-
[`setImmediate`] is described in the [timers][] section.
160+
[`setImmediate`][] is described in the [timers][] section.
161161

162162
## setInterval(callback, delay[, ...args])
163163
<!-- YAML
@@ -166,7 +166,7 @@ added: v0.0.1
166166

167167
<!-- type=global -->
168168

169-
[`setInterval`] is described in the [timers][] section.
169+
[`setInterval`][] is described in the [timers][] section.
170170

171171
## setTimeout(callback, delay[, ...args])
172172
<!-- YAML
@@ -175,7 +175,7 @@ added: v0.0.1
175175

176176
<!-- type=global -->
177177

178-
[`setTimeout`] is described in the [timers][] section.
178+
[`setTimeout`][] is described in the [timers][] section.
179179

180180
## TextDecoder
181181
<!-- YAML

doc/api/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ the requests to that server, but each one will occur over a new connection.
7171
When a connection is closed by the client or the server, it is removed
7272
from the pool. Any unused sockets in the pool will be unrefed so as not
7373
to keep the Node.js process running when there are no outstanding requests.
74-
(see [`socket.unref()`]).
74+
(see [`socket.unref()`][]).
7575

7676
It is good practice, to [`destroy()`][] an `Agent` instance when it is no
7777
longer in use, because unused sockets consume OS resources.

doc/api/http2.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ added: v9.4.0
500500
-->
501501

502502
Calls [`ref()`][`net.Socket.prototype.ref()`] on this `Http2Session`
503-
instance's underlying [`net.Socket`].
503+
instance's underlying [`net.Socket`][].
504504

505505
#### http2session.remoteSettings
506506
<!-- YAML
@@ -613,7 +613,7 @@ added: v9.4.0
613613
-->
614614

615615
Calls [`unref()`][`net.Socket.prototype.unref()`] on this `Http2Session`
616-
instance's underlying [`net.Socket`].
616+
instance's underlying [`net.Socket`][].
617617

618618
### Class: ServerHttp2Session
619619
<!-- YAML
@@ -1756,7 +1756,7 @@ added: v8.4.0
17561756

17571757
Stops the server from establishing new sessions. This does not prevent new
17581758
request streams from being created due to the persistent nature of HTTP/2
1759-
sessions. To gracefully shut down the server, call [`http2session.close()`] on
1759+
sessions. To gracefully shut down the server, call [`http2session.close()`][] on
17601760
all active sessions.
17611761

17621762
If `callback` is provided, it is not invoked until all active sessions have been
@@ -1905,7 +1905,7 @@ added: v8.4.0
19051905

19061906
Stops the server from establishing new sessions. This does not prevent new
19071907
request streams from being created due to the persistent nature of HTTP/2
1908-
sessions. To gracefully shut down the server, call [`http2session.close()`] on
1908+
sessions. To gracefully shut down the server, call [`http2session.close()`][] on
19091909
all active sessions.
19101910

19111911
If `callback` is provided, it is not invoked until all active sessions have been
@@ -3420,7 +3420,7 @@ added: v8.4.0
34203420
* `stream` {ServerHttp2Stream} The newly-created `ServerHttp2Stream` object
34213421

34223422
Call [`http2stream.pushStream()`][] with the given headers, and wrap the
3423-
given [`Http2Stream`] on a newly created `Http2ServerResponse` as the callback
3423+
given [`Http2Stream`][] on a newly created `Http2ServerResponse` as the callback
34243424
parameter if successful. When `Http2ServerRequest` is closed, the callback is
34253425
called with an error `ERR_HTTP2_INVALID_STREAM`.
34263426

doc/api/inspector.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ added: v8.0.0
137137
-->
138138

139139
Immediately close the session. All pending message callbacks will be called
140-
with an error. [`session.connect()`] will need to be called to be able to send
140+
with an error. [`session.connect()`][] will need to be called to be able to send
141141
messages again. Reconnected session will lose all inspector state, such as
142142
enabled agents or configured breakpoints.
143143

doc/api/process.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ all `'exit'` listeners have finished running the Node.js process will terminate.
8080

8181
The listener callback function is invoked with the exit code specified either
8282
by the [`process.exitCode`][] property, or the `exitCode` argument passed to the
83-
[`process.exit()`] method.
83+
[`process.exit()`][] method.
8484

8585
```js
8686
process.on('exit', (code) => {
@@ -570,8 +570,8 @@ added: v0.1.27
570570

571571
The `process.argv` property returns an array containing the command line
572572
arguments passed when the Node.js process was launched. The first element will
573-
be [`process.execPath`]. See `process.argv0` if access to the original value of
574-
`argv[0]` is needed. The second element will be the path to the JavaScript
573+
be [`process.execPath`][]. See `process.argv0` if access to the original value
574+
of `argv[0]` is needed. The second element will be the path to the JavaScript
575575
file being executed. The remaining elements will be any additional command line
576576
arguments.
577577

@@ -1122,7 +1122,7 @@ added: v0.1.13
11221122
The `process.exit()` method instructs Node.js to terminate the process
11231123
synchronously with an exit status of `code`. If `code` is omitted, exit uses
11241124
either the 'success' code `0` or the value of `process.exitCode` if it has been
1125-
set. Node.js will not terminate until all the [`'exit'`] event listeners are
1125+
set. Node.js will not terminate until all the [`'exit'`][] event listeners are
11261126
called.
11271127

11281128
To exit with a 'failure' code:
@@ -1506,7 +1506,7 @@ changes:
15061506
fully drained after the current operation on the JavaScript stack runs to
15071507
completion and before the event loop is allowed to continue. It's possible to
15081508
create an infinite loop if one were to recursively call `process.nextTick()`.
1509-
See the [Event Loop] guide for more background.
1509+
See the [Event Loop][] guide for more background.
15101510

15111511
```js
15121512
console.log('start');

doc/api/readline.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
> Stability: 2 - Stable
66
77
The `readline` module provides an interface for reading data from a [Readable][]
8-
stream (such as [`process.stdin`]) one line at a time. It can be accessed using:
8+
stream (such as [`process.stdin`][]) one line at a time. It can be accessed
9+
using:
910

1011
```js
1112
const readline = require('readline');

doc/api/stream.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ total size of the internal write buffer is below the threshold set by
8989
the size of the internal buffer reaches or exceeds the `highWaterMark`, `false`
9090
will be returned.
9191

92-
A key goal of the `stream` API, particularly the [`stream.pipe()`] method,
92+
A key goal of the `stream` API, particularly the [`stream.pipe()`][] method,
9393
is to limit the buffering of data to acceptable levels such that sources and
9494
destinations of differing speeds will not overwhelm the available memory.
9595

@@ -682,7 +682,7 @@ from the stream.
682682

683683
Adding a [`'readable'`][] event handler automatically make the stream to
684684
stop flowing, and the data to be consumed via
685-
[`readable.read()`][stream-read]. If the [`'readable'`] event handler is
685+
[`readable.read()`][stream-read]. If the [`'readable'`][] event handler is
686686
removed, then the stream will start flowing again if there is a
687687
[`'data'`][] event handler.
688688

@@ -1653,10 +1653,10 @@ on the type of stream being created, as detailed in the chart below:
16531653

16541654
| Use-case | Class | Method(s) to implement |
16551655
| -------- | ----- | ---------------------- |
1656-
| Reading only | [`Readable`] | <code>[_read()][stream-_read]</code> |
1657-
| Writing only | [`Writable`] | <code>[_write()][stream-_write]</code>, <code>[_writev()][stream-_writev]</code>, <code>[_final()][stream-_final]</code> |
1658-
| Reading and writing | [`Duplex`] | <code>[_read()][stream-_read]</code>, <code>[_write()][stream-_write]</code>, <code>[_writev()][stream-_writev]</code>, <code>[_final()][stream-_final]</code> |
1659-
| Operate on written data, then read the result | [`Transform`] | <code>[_transform()][stream-_transform]</code>, <code>[_flush()][stream-_flush]</code>, <code>[_final()][stream-_final]</code> |
1656+
| Reading only | [`Readable`][] | [`_read()`][stream-_read] |
1657+
| Writing only | [`Writable`][] | [`_write()`][stream-_write], [`_writev()`][stream-_writev], [`_final()`][stream-_final] |
1658+
| Reading and writing | [`Duplex`][] | [`_read()`][stream-_read], [`_write()`][stream-_write], [`_writev()`][stream-_writev], [`_final()`][stream-_final] |
1659+
| Operate on written data, then read the result | [`Transform`][] | [`_transform()`][stream-_transform], [`_flush()`][stream-_flush], [`_final()`][stream-_final] |
16601660

16611661
The implementation code for a stream should *never* call the "public" methods
16621662
of a stream that are intended for use by consumers (as described in the
@@ -1881,7 +1881,7 @@ or write buffered data before a stream ends.
18811881
#### Errors While Writing
18821882

18831883
Errors occurring during the processing of the [`writable._write()`][],
1884-
[`writable._writev()`][] and [`writable._final()`] methods must be propagated
1884+
[`writable._writev()`][] and [`writable._final()`][] methods must be propagated
18851885
by invoking the callback and passing the error as the first argument.
18861886
Throwing an `Error` from within these methods or manually emitting an `'error'`
18871887
event results in undefined behavior.

0 commit comments

Comments
 (0)