Skip to content

Commit 500e709

Browse files
Trottcodebytere
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 bf0550c commit 500e709

16 files changed

+108
-107
lines changed

doc/api/addons.md

+16-15
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
@@ -397,14 +398,14 @@ the appropriate headers automatically. However, there are a few caveats to be
397398
aware of:
398399

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

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

409410
### Loading addons using `require()`
410411

doc/api/assert.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ added:
237237
-->
238238

239239
* Returns: {Array} of objects containing information about the wrapper functions
240-
returned by [`tracker.calls()`][].
240+
returned by [`tracker.calls()`][].
241241
* Object {Object}
242242
* `message` {string}
243243
* `actual` {number} The actual number of times the function was called.

doc/api/async_hooks.md

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

711711
Example usage:
712712

@@ -791,7 +791,7 @@ never be called.
791791
#### `asyncResource.triggerAsyncId()`
792792

793793
* Returns: {number} The same `triggerAsyncId` that is passed to the
794-
`AsyncResource` constructor.
794+
`AsyncResource` constructor.
795795

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

doc/api/debugger.md

+7-7
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

+5-5
Original file line numberDiff line numberDiff line change
@@ -250,13 +250,13 @@ changes:
250250
The following flags can be passed as hints to [`dns.lookup()`][].
251251

252252
* `dns.ADDRCONFIG`: Limits returned address types to the types of non-loopback
253-
addresses configured on the system. For example, IPv4 addresses are only
254-
returned if the current system has at least one IPv4 address configured.
253+
addresses configured on the system. For example, IPv4 addresses are only
254+
returned if the current system has at least one IPv4 address configured.
255255
* `dns.V4MAPPED`: If the IPv6 family was specified, but no IPv6 addresses were
256-
found, then return IPv4 mapped IPv6 addresses. It is not supported
257-
on some operating systems (e.g FreeBSD 10.1).
256+
found, then return IPv4 mapped IPv6 addresses. It is not supported
257+
on some operating systems (e.g FreeBSD 10.1).
258258
* `dns.ALL`: If `dns.V4MAPPED` is specified, return resolved IPv6 addresses as
259-
well as IPv4 mapped IPv6 addresses.
259+
well as IPv4 mapped IPv6 addresses.
260260

261261
## `dns.lookupService(address, port, callback)`
262262
<!-- YAML

doc/api/fs.md

+22-22
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');
@@ -1780,7 +1780,7 @@ changes:
17801780
* `path` {string|Buffer|URL}
17811781
* `options` {string|Object}
17821782
* `flags` {string} See [support of file system `flags`][]. **Default:**
1783-
`'r'`.
1783+
`'r'`.
17841784
* `encoding` {string} **Default:** `null`
17851785
* `fd` {integer} **Default:** `null`
17861786
* `mode` {integer} **Default:** `0o666`
@@ -1885,7 +1885,7 @@ changes:
18851885
* `path` {string|Buffer|URL}
18861886
* `options` {string|Object}
18871887
* `flags` {string} See [support of file system `flags`][]. **Default:**
1888-
`'w'`.
1888+
`'w'`.
18891889
* `encoding` {string} **Default:** `'utf8'`
18901890
* `fd` {integer} **Default:** `null`
18911891
* `mode` {integer} **Default:** `0o666`
@@ -3129,11 +3129,11 @@ system requests but rather the internal buffering `fs.readFile` performs.
31293129

31303130
1. Any specified file descriptor has to support reading.
31313131
2. If a file descriptor is specified as the `path`, it will not be closed
3132-
automatically.
3132+
automatically.
31333133
3. The reading will begin at the current position. For example, if the file
3134-
already had `'Hello World`' and six bytes are read with the file descriptor,
3135-
the call to `fs.readFile()` with the same file descriptor, would give
3136-
`'World'`, rather than `'Hello World'`.
3134+
already had `'Hello World`' and six bytes are read with the file descriptor,
3135+
the call to `fs.readFile()` with the same file descriptor, would give
3136+
`'World'`, rather than `'Hello World'`.
31373137

31383138
## `fs.readFileSync(path[, options])`
31393139
<!-- YAML
@@ -5227,13 +5227,13 @@ OR of two or more values (e.g.
52275227
`fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`).
52285228

52295229
* `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already
5230-
exists.
5230+
exists.
52315231
* `fs.constants.COPYFILE_FICLONE`: The copy operation will attempt to create a
5232-
copy-on-write reflink. If the platform does not support copy-on-write, then a
5233-
fallback copy mechanism is used.
5232+
copy-on-write reflink. If the platform does not support copy-on-write, then a
5233+
fallback copy mechanism is used.
52345234
* `fs.constants.COPYFILE_FICLONE_FORCE`: The copy operation will attempt to
5235-
create a copy-on-write reflink. If the platform does not support copy-on-write,
5236-
then the operation will fail.
5235+
create a copy-on-write reflink. If the platform does not support
5236+
copy-on-write, then the operation will fail.
52375237

52385238
```js
52395239
const {
@@ -6133,7 +6133,7 @@ string.
61336133
* `'wx'`: Like `'w'` but fails if the path exists.
61346134

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

61386138
* `'wx+'`: Like `'w+'` but fails if the path exists.
61396139

doc/api/http.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1997,9 +1997,9 @@ Duplicates in raw headers are handled in the following ways, depending on the
19971997
header name:
19981998

19991999
* Duplicates of `age`, `authorization`, `content-length`, `content-type`,
2000-
`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,
2001-
`last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`,
2002-
`retry-after`, `server`, or `user-agent` are discarded.
2000+
`etag`, `expires`, `from`, `host`, `if-modified-since`, `if-unmodified-since`,
2001+
`last-modified`, `location`, `max-forwards`, `proxy-authorization`, `referer`,
2002+
`retry-after`, `server`, or `user-agent` are discarded.
20032003
* `set-cookie` is always an array. Duplicates are added to the array.
20042004
* For duplicate `cookie` headers, the values are joined together with '; '.
20052005
* For all other headers, the values are joined together with ', '.

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1429,7 +1429,7 @@ added: v8.4.0
14291429
* `err` {Error}
14301430
* `pushStream` {ServerHttp2Stream} The returned `pushStream` object.
14311431
* `headers` {HTTP/2 Headers Object} Headers object the `pushStream` was
1432-
initiated with.
1432+
initiated with.
14331433

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

doc/api/https.md

+1-1
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

+1-1
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

doc/api/n-api.md

+10-10
Original file line numberDiff line numberDiff line change
@@ -864,8 +864,8 @@ typedef void (*napi_async_cleanup_hook)(napi_async_cleanup_hook_handle handle,
864864
```
865865

866866
* `[in] handle`: The handle that must be passed to
867-
[`napi_remove_async_cleanup_hook`][] after completion of the asynchronous
868-
cleanup.
867+
[`napi_remove_async_cleanup_hook`][] after completion of the asynchronous
868+
cleanup.
869869
* `[in] data`: The data that was passed to [`napi_add_async_cleanup_hook`][].
870870

871871
The body of the function should initiate the asynchronous cleanup actions at the
@@ -945,7 +945,7 @@ napi_get_last_error_info(napi_env env,
945945

946946
* `[in] env`: The environment that the API is invoked under.
947947
* `[out] result`: The `napi_extended_error_info` structure with more
948-
information about the error.
948+
information about the error.
949949

950950
Returns `napi_ok` if the API succeeded.
951951

@@ -1725,7 +1725,7 @@ NAPI_EXTERN napi_status napi_add_async_cleanup_hook(
17251725
* `[in] hook`: The function pointer to call at environment teardown.
17261726
* `[in] arg`: The pointer to pass to `hook` when it gets called.
17271727
* `[out] remove_handle`: Optional handle that refers to the asynchronous cleanup
1728-
hook.
1728+
hook.
17291729

17301730
Registers `hook`, which is a function of type [`napi_async_cleanup_hook`][], as
17311731
a function to be run with the `remove_handle` and `arg` parameters once the
@@ -1762,7 +1762,7 @@ NAPI_EXTERN napi_status napi_remove_async_cleanup_hook(
17621762
```
17631763

17641764
* `[in] remove_handle`: The handle to an asynchronous cleanup hook that was
1765-
created with [`napi_add_async_cleanup_hook`][].
1765+
created with [`napi_add_async_cleanup_hook`][].
17661766

17671767
Unregisters the cleanup hook corresponding to `remove_handle`. This will prevent
17681768
the hook from being executed, unless it has already started executing.
@@ -3372,7 +3372,7 @@ napi_status napi_typeof(napi_env env, napi_value value, napi_valuetype* result)
33723372
Returns `napi_ok` if the API succeeded.
33733373

33743374
* `napi_invalid_arg` if the type of `value` is not a known ECMAScript type and
3375-
`value` is not an External value.
3375+
`value` is not an External value.
33763376

33773377
This API represents behavior similar to invoking the `typeof` Operator on
33783378
the object as defined in [Section 12.5.5][] of the ECMAScript Language
@@ -3902,11 +3902,11 @@ napi_get_all_property_names(napi_env env,
39023902
* `[in] object`: The object from which to retrieve the properties.
39033903
* `[in] key_mode`: Whether to retrieve prototype properties as well.
39043904
* `[in] key_filter`: Which properties to retrieve
3905-
(enumerable/readable/writable).
3905+
(enumerable/readable/writable).
39063906
* `[in] key_conversion`: Whether to convert numbered property keys to strings.
39073907
* `[out] result`: A `napi_value` representing an array of JavaScript values
3908-
that represent the property names of the object. [`napi_get_array_length`][] and
3909-
[`napi_get_element`][] can be used to iterate over `result`.
3908+
that represent the property names of the object. [`napi_get_array_length`][]
3909+
and [`napi_get_element`][] can be used to iterate over `result`.
39103910

39113911
Returns `napi_ok` if the API succeeded.
39123912

@@ -4942,7 +4942,7 @@ napi_status napi_check_object_type_tag(napi_env env,
49424942
* `[in] js_object`: The JavaScript object whose type tag to examine.
49434943
* `[in] type_tag`: The tag with which to compare any tag found on the object.
49444944
* `[out] result`: Whether the type tag given matched the type tag on the
4945-
object. `false` is also returned if no type tag was found on the object.
4945+
object. `false` is also returned if no type tag was found on the object.
49464946

49474947
Returns `napi_ok` if the API succeeded.
49484948

0 commit comments

Comments
 (0)