Skip to content

Commit d796bc7

Browse files
TrottBethGriggs
authored andcommitted
doc: update list styles for remark-parse@9 rendering
remark-parse@9.0.0 combined with our html.js tool ends a list if a multi-line item does not include indentation. Update our docs for this formatting. I looked around for a lint rule to enforce this but didn't find one readily available. (Happy to be shown that I'm wrong about that!) We may need to write one. PR-URL: #36049 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
1 parent 5a41282 commit d796bc7

File tree

16 files changed

+108
-107
lines changed

16 files changed

+108
-107
lines changed

doc/api/addons.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,25 +154,26 @@ they were created.
154154
155155
The context-aware addon can be structured to avoid global static data by
156156
performing the following steps:
157+
157158
* Define a class which will hold per-addon-instance data and which has a static
158-
member of the form
159+
member of the form
159160
```cpp
160161
static void DeleteInstance(void* data) {
161162
// Cast `data` to an instance of the class and delete it.
162163
}
163164
```
164165
* Heap-allocate an instance of this class in the addon initializer. This can be
165-
accomplished using the `new` keyword.
166+
accomplished using the `new` keyword.
166167
* Call `node::AddEnvironmentCleanupHook()`, passing it the above-created
167-
instance and a pointer to `DeleteInstance()`. This will ensure the instance is
168-
deleted when the environment is torn down.
168+
instance and a pointer to `DeleteInstance()`. This will ensure the instance is
169+
deleted when the environment is torn down.
169170
* Store the instance of the class in a `v8::External`, and
170171
* Pass the `v8::External` to all methods exposed to JavaScript by passing it
171-
to `v8::FunctionTemplate::New()` or `v8::Function::New()` which creates the
172-
native-backed JavaScript functions. The third parameter of
173-
`v8::FunctionTemplate::New()` or `v8::Function::New()` accepts the
174-
`v8::External` and makes it available in the native callback using the
175-
`v8::FunctionCallbackInfo::Data()` method.
172+
to `v8::FunctionTemplate::New()` or `v8::Function::New()` which creates the
173+
native-backed JavaScript functions. The third parameter of
174+
`v8::FunctionTemplate::New()` or `v8::Function::New()` accepts the
175+
`v8::External` and makes it available in the native callback using the
176+
`v8::FunctionCallbackInfo::Data()` method.
176177

177178
This will ensure that the per-addon-instance data reaches each binding that can
178179
be called from JavaScript. The per-addon-instance data must also be passed into
@@ -395,14 +396,14 @@ the appropriate headers automatically. However, there are a few caveats to be
395396
aware of:
396397

397398
* When `node-gyp` runs, it will detect the specific release version of Node.js
398-
and download either the full source tarball or just the headers. If the full
399-
source is downloaded, addons will have complete access to the full set of
400-
Node.js dependencies. However, if only the Node.js headers are downloaded, then
401-
only the symbols exported by Node.js will be available.
399+
and download either the full source tarball or just the headers. If the full
400+
source is downloaded, addons will have complete access to the full set of
401+
Node.js dependencies. However, if only the Node.js headers are downloaded,
402+
then only the symbols exported by Node.js will be available.
402403

403404
* `node-gyp` can be run using the `--nodedir` flag pointing at a local Node.js
404-
source image. Using this option, the addon will have access to the full set of
405-
dependencies.
405+
source image. Using this option, the addon will have access to the full set of
406+
dependencies.
406407

407408
### Loading addons using `require()`
408409

doc/api/assert.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ added: v14.2.0
223223
-->
224224

225225
* Returns: {Array} of objects containing information about the wrapper functions
226-
returned by [`tracker.calls()`][].
226+
returned by [`tracker.calls()`][].
227227
* Object {Object}
228228
* `message` {string}
229229
* `actual` {number} The actual number of times the function was called.

doc/api/async_hooks.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,14 +697,14 @@ asyncResource.triggerAsyncId();
697697
* `type` {string} The type of async event.
698698
* `options` {Object}
699699
* `triggerAsyncId` {number} The ID of the execution context that created this
700-
async event. **Default:** `executionAsyncId()`.
700+
async event. **Default:** `executionAsyncId()`.
701701
* `requireManualDestroy` {boolean} If set to `true`, disables `emitDestroy`
702-
when the object is garbage collected. This usually does not need to be set
703-
(even if `emitDestroy` is called manually), unless the resource's `asyncId`
704-
is retrieved and the sensitive API's `emitDestroy` is called with it.
705-
When set to `false`, the `emitDestroy` call on garbage collection
706-
will only take place if there is at least one active `destroy` hook.
707-
**Default:** `false`.
702+
when the object is garbage collected. This usually does not need to be set
703+
(even if `emitDestroy` is called manually), unless the resource's `asyncId`
704+
is retrieved and the sensitive API's `emitDestroy` is called with it.
705+
When set to `false`, the `emitDestroy` call on garbage collection
706+
will only take place if there is at least one active `destroy` hook.
707+
**Default:** `false`.
708708

709709
Example usage:
710710

@@ -785,7 +785,7 @@ never be called.
785785
#### `asyncResource.triggerAsyncId()`
786786

787787
* Returns: {number} The same `triggerAsyncId` that is passed to the
788-
`AsyncResource` constructor.
788+
`AsyncResource` constructor.
789789

790790
<a id="async-resource-worker-pool"></a>
791791
### Using `AsyncResource` for a `Worker` thread pool

doc/api/debugger.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,14 @@ To begin watching an expression, type `watch('my_expression')`. The command
115115
* `setBreakpoint()`, `sb()`: Set breakpoint on current line
116116
* `setBreakpoint(line)`, `sb(line)`: Set breakpoint on specific line
117117
* `setBreakpoint('fn()')`, `sb(...)`: Set breakpoint on a first statement in
118-
functions body
118+
functions body
119119
* `setBreakpoint('script.js', 1)`, `sb(...)`: Set breakpoint on first line of
120-
`script.js`
120+
`script.js`
121121
* `setBreakpoint('script.js', 1, 'num < 4')`, `sb(...)`: Set conditional
122-
breakpoint on first line of `script.js` that only breaks when `num < 4`
123-
evaluates to `true`
122+
breakpoint on first line of `script.js` that only breaks when `num < 4`
123+
evaluates to `true`
124124
* `clearBreakpoint('script.js', 1)`, `cb(...)`: Clear breakpoint in `script.js`
125-
on line 1
125+
on line 1
126126

127127
It is also possible to set a breakpoint in a file (module) that
128128
is not loaded yet:
@@ -188,11 +188,11 @@ debug>
188188

189189
* `backtrace`, `bt`: Print backtrace of current execution frame
190190
* `list(5)`: List scripts source code with 5 line context (5 lines before and
191-
after)
191+
after)
192192
* `watch(expr)`: Add expression to watch list
193193
* `unwatch(expr)`: Remove expression from watch list
194194
* `watchers`: List all watchers and their values (automatically listed on each
195-
breakpoint)
195+
breakpoint)
196196
* `repl`: Open debugger's repl for evaluation in debugging script's context
197197
* `exec expr`: Execute an expression in debugging script's context
198198

doc/api/dns.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -226,13 +226,13 @@ changes:
226226
The following flags can be passed as hints to [`dns.lookup()`][].
227227

228228
* `dns.ADDRCONFIG`: Limits returned address types to the types of non-loopback
229-
addresses configured on the system. For example, IPv4 addresses are only
230-
returned if the current system has at least one IPv4 address configured.
229+
addresses configured on the system. For example, IPv4 addresses are only
230+
returned if the current system has at least one IPv4 address configured.
231231
* `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were
232-
found, then return IPv4 mapped IPv6 addresses. It is not supported
233-
on some operating systems (e.g FreeBSD 10.1).
232+
found, then return IPv4 mapped IPv6 addresses. It is not supported
233+
on some operating systems (e.g FreeBSD 10.1).
234234
* `dns.ALL`: If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
235-
well as IPv4 mapped IPv6 addresses.
235+
well as IPv4 mapped IPv6 addresses.
236236

237237
## `dns.lookupService(address, port, callback)`
238238
<!-- YAML

doc/api/fs.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,13 +1678,13 @@ OR of two or more values (e.g.
16781678
`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
16791679

16801680
* `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
1681-
exists.
1681+
exists.
16821682
* `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
1683-
copy-on-write reflink. If the platform does not support copy-on-write, then a
1684-
fallback copy mechanism is used.
1683+
copy-on-write reflink. If the platform does not support copy-on-write, then a
1684+
fallback copy mechanism is used.
16851685
* `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
1686-
create a copy-on-write reflink. If the platform does not support copy-on-write,
1687-
then the operation will fail.
1686+
create a copy-on-write reflink. If the platform does not support
1687+
copy-on-write, then the operation will fail.
16881688

16891689
```js
16901690
const fs = require('fs');
@@ -1727,13 +1727,13 @@ OR of two or more values (e.g.
17271727
`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
17281728

17291729
* `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
1730-
exists.
1730+
exists.
17311731
* `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
1732-
copy-on-write reflink. If the platform does not support copy-on-write, then a
1733-
fallback copy mechanism is used.
1732+
copy-on-write reflink. If the platform does not support copy-on-write, then a
1733+
fallback copy mechanism is used.
17341734
* `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
1735-
create a copy-on-write reflink. If the platform does not support copy-on-write,
1736-
then the operation will fail.
1735+
create a copy-on-write reflink. If the platform does not support
1736+
copy-on-write, then the operation will fail.
17371737

17381738
```js
17391739
const fs = require('fs');
@@ -1778,7 +1778,7 @@ changes:
17781778
* `path` {string|Buffer|URL}
17791779
* `options` {string|Object}
17801780
* `flags` {string} See [support of file system `flags`][]. **Default:**
1781-
`'r'`.
1781+
`'r'`.
17821782
* `encoding` {string} **Default:** `null`
17831783
* `fd` {integer} **Default:** `null`
17841784
* `mode` {integer} **Default:** `0o666`
@@ -1881,7 +1881,7 @@ changes:
18811881
* `path` {string|Buffer|URL}
18821882
* `options` {string|Object}
18831883
* `flags` {string} See [support of file system `flags`][]. **Default:**
1884-
`'w'`.
1884+
`'w'`.
18851885
* `encoding` {string} **Default:** `'utf8'`
18861886
* `fd` {integer} **Default:** `null`
18871887
* `mode` {integer} **Default:** `0o666`
@@ -3092,11 +3092,11 @@ when possible prefer streaming via `fs.createReadStream()`.
30923092

30933093
1. Any specified file descriptor has to support reading.
30943094
2. If a file descriptor is specified as the `path`, it will not be closed
3095-
automatically.
3095+
automatically.
30963096
3. The reading will begin at the current position. For example, if the file
3097-
already had `'Hello World`' and six bytes are read with the file descriptor,
3098-
the call to `fs.readFile()` with the same file descriptor, would give
3099-
`'World'`, rather than `'Hello World'`.
3097+
already had `'Hello World`' and six bytes are read with the file descriptor,
3098+
the call to `fs.readFile()` with the same file descriptor, would give
3099+
`'World'`, rather than `'Hello World'`.
31003100

31013101
## `fs.readFileSync(path[, options])`
31023102
<!-- YAML
@@ -5135,13 +5135,13 @@ OR of two or more values (e.g.
51355135
`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
51365136

51375137
* `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
5138-
exists.
5138+
exists.
51395139
* `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
5140-
copy-on-write reflink. If the platform does not support copy-on-write, then a
5141-
fallback copy mechanism is used.
5140+
copy-on-write reflink. If the platform does not support copy-on-write, then a
5141+
fallback copy mechanism is used.
51425142
* `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
5143-
create a copy-on-write reflink. If the platform does not support copy-on-write,
5144-
then the operation will fail.
5143+
create a copy-on-write reflink. If the platform does not support
5144+
copy-on-write, then the operation will fail.
51455145

51465146
```js
51475147
const {
@@ -5987,7 +5987,7 @@ string.
59875987
* `'wx'`: Like `'w'` but fails if the path exists.
59885988

59895989
* `'w+'`: Open file for reading and writing.
5990-
The file is created (if it does not exist) or truncated (if it exists).
5990+
The file is created (if it does not exist) or truncated (if it exists).
59915991

59925992
* `'wx+'`: Like `'w+'` but fails if the path exists.
59935993

doc/api/http.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1984,9 +1984,9 @@ Duplicates in raw headers are handled in the following ways, depending on the
19841984
header name:
19851985

19861986
* Duplicates of `age`, `authorization`, `content-length`, `content-type`,
1987-
`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,
1988-
`last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`,
1989-
`retry-after`, `server`, or `user-agent` are discarded.
1987+
`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,
1988+
`last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`,
1989+
`retry-after`, `server`, or `user-agent` are discarded.
19901990
* `set-cookie` is always an array. Duplicates are added to the array.
19911991
* For duplicate `cookie` headers, the values are joined together with '; '.
19921992
* For all other headers, the values are joined together with ', '.

doc/api/http2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,7 +1402,7 @@ added: v8.4.0
14021402
* `err` {Error}
14031403
* `pushStream` {ServerHttp2Stream} The returned `pushStream` object.
14041404
* `headers` {HTTP/2 Headers Object} Headers object the `pushStream` was
1405-
initiated with.
1405+
initiated with.
14061406

14071407
Initiates a push stream. The callback is invoked with the new `Http2Stream`
14081408
instance created for the push stream passed as the second argument, or an

doc/api/https.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ added: v0.3.4
161161
-->
162162

163163
* `options` {Object} Accepts `options` from [`tls.createServer()`][],
164-
[`tls.createSecureContext()`][] and [`http.createServer()`][].
164+
[`tls.createSecureContext()`][] and [`http.createServer()`][].
165165
* `requestListener` {Function} A listener to be added to the `'request'` event.
166166
* Returns: {https.Server}
167167

doc/api/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ wrapper that looks like the following:
503503
By doing this, Node.js achieves a few things:
504504

505505
* It keeps top-level variables (defined with `var`, `const` or `let`) scoped to
506-
the module rather than the global object.
506+
the module rather than the global object.
507507
* It helps to provide some global-looking variables that are actually specific
508508
to the module, such as:
509509
* The `module` and `exports` objects that the implementor can use to export

0 commit comments

Comments
 (0)