GeezerVison is showing github.com — doc: update list styles for remark-parse@9 rendering · nodejs/node@d796bc7
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: doc/api/addons.md +16-15Lines changed: 16 additions & 15 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -154,25 +154,26 @@ they were created. | 154 | 154 |
| 155 | 155 | The context-aware addon can be structured to avoid global static data by | 156 | 156 | performing the following steps: | | 157 | + | 157 | 158 | * 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 | 159 | 160 | ```cpp | 160 | 161 | static void DeleteInstance(void* data) { | 161 | 162 | // Cast `data` to an instance of the class and delete it. | 162 | 163 | } | 163 | 164 | ``` | 164 | 165 | * 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. | 166 | 167 | * 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. | 169 | 170 | * Store the instance of the class in a `v8::External`, and | 170 | 171 | * 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. | 176 | 177 |
| 177 | 178 | This will ensure that the per-addon-instance data reaches each binding that can | 178 | 179 | 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 | 395 | 396 | aware of: | 396 | 397 |
| 397 | 398 | * 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. | 402 | 403 |
| 403 | 404 | * `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. | 406 | 407 |
| 407 | 408 | ### Loading addons using `require()` | 408 | 409 |
| |
Collapse file Copy file name to clipboardExpand all lines: doc/api/assert.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -223,7 +223,7 @@ added: v14.2.0 | 223 | 223 | --> | 224 | 224 |
| 225 | 225 | * Returns: {Array} of objects containing information about the wrapper functions | 226 | | -returned by [`tracker.calls()`][]. | | 226 | + returned by [`tracker.calls()`][]. | 227 | 227 | * Object {Object} | 228 | 228 | * `message` {string} | 229 | 229 | * `actual` {number} The actual number of times the function was called. | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/async_hooks.md +8-8Lines changed: 8 additions & 8 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -697,14 +697,14 @@ asyncResource.triggerAsyncId(); | 697 | 697 | * `type` {string} The type of async event. | 698 | 698 | * `options` {Object} | 699 | 699 | * `triggerAsyncId` {number} The ID of the execution context that created this | 700 | | - async event. **Default:** `executionAsyncId()`. | | 700 | + async event. **Default:** `executionAsyncId()`. | 701 | 701 | * `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`. | 708 | 708 |
| 709 | 709 | Example usage: | 710 | 710 |
| @@ -785,7 +785,7 @@ never be called. | 785 | 785 | #### `asyncResource.triggerAsyncId()` | 786 | 786 |
| 787 | 787 | * Returns: {number} The same `triggerAsyncId` that is passed to the | 788 | | -`AsyncResource` constructor. | | 788 | + `AsyncResource` constructor. | 789 | 789 |
| 790 | 790 | <a id="async-resource-worker-pool"></a> | 791 | 791 | ### Using `AsyncResource` for a `Worker` thread pool | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/debugger.md +7-7Lines changed: 7 additions & 7 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -115,14 +115,14 @@ To begin watching an expression, type `watch('my_expression')`. The command | 115 | 115 | * `setBreakpoint()`, `sb()`: Set breakpoint on current line | 116 | 116 | * `setBreakpoint(line)`, `sb(line)`: Set breakpoint on specific line | 117 | 117 | * `setBreakpoint('fn()')`, `sb(...)`: Set breakpoint on a first statement in | 118 | | -functions body | | 118 | + functions body | 119 | 119 | * `setBreakpoint('script.js', 1)`, `sb(...)`: Set breakpoint on first line of | 120 | | -`script.js` | | 120 | + `script.js` | 121 | 121 | * `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` | 124 | 124 | * `clearBreakpoint('script.js', 1)`, `cb(...)`: Clear breakpoint in `script.js` | 125 | | -on line 1 | | 125 | + on line 1 | 126 | 126 |
| 127 | 127 | It is also possible to set a breakpoint in a file (module) that | 128 | 128 | is not loaded yet: | @@ -188,11 +188,11 @@ debug> | 188 | 188 |
| 189 | 189 | * `backtrace`, `bt`: Print backtrace of current execution frame | 190 | 190 | * `list(5)`: List scripts source code with 5 line context (5 lines before and | 191 | | -after) | | 191 | + after) | 192 | 192 | * `watch(expr)`: Add expression to watch list | 193 | 193 | * `unwatch(expr)`: Remove expression from watch list | 194 | 194 | * `watchers`: List all watchers and their values (automatically listed on each | 195 | | -breakpoint) | | 195 | + breakpoint) | 196 | 196 | * `repl`: Open debugger's repl for evaluation in debugging script's context | 197 | 197 | * `exec expr`: Execute an expression in debugging script's context | 198 | 198 |
| |
Collapse file Copy file name to clipboardExpand all lines: doc/api/dns.md +5-5Lines changed: 5 additions & 5 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -226,13 +226,13 @@ changes: | 226 | 226 | The following flags can be passed as hints to [`dns.lookup()`][]. | 227 | 227 |
| 228 | 228 | * `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. | 231 | 231 | * `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). | 234 | 234 | * `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. | 236 | 236 |
| 237 | 237 | ## `dns.lookupService(address, port, callback)` | 238 | 238 | <!-- YAML | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/fs.md +22-22Lines changed: 22 additions & 22 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1678,13 +1678,13 @@ OR of two or more values (e.g. | 1678 | 1678 | `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). | 1679 | 1679 |
| 1680 | 1680 | * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already | 1681 | | -exists. | | 1681 | + exists. | 1682 | 1682 | * `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. | 1685 | 1685 | * `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. | 1688 | 1688 |
| 1689 | 1689 | ```js | 1690 | 1690 | const fs = require('fs'); | @@ -1727,13 +1727,13 @@ OR of two or more values (e.g. | 1727 | 1727 | `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). | 1728 | 1728 |
| 1729 | 1729 | * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already | 1730 | | -exists. | | 1730 | + exists. | 1731 | 1731 | * `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. | 1734 | 1734 | * `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. | 1737 | 1737 |
| 1738 | 1738 | ```js | 1739 | 1739 | const fs = require('fs'); | @@ -1778,7 +1778,7 @@ changes: | 1778 | 1778 | * `path` {string|Buffer|URL} | 1779 | 1779 | * `options` {string|Object} | 1780 | 1780 | * `flags` {string} See [support of file system `flags`][]. **Default:** | 1781 | | - `'r'`. | | 1781 | + `'r'`. | 1782 | 1782 | * `encoding` {string} **Default:** `null` | 1783 | 1783 | * `fd` {integer} **Default:** `null` | 1784 | 1784 | * `mode` {integer} **Default:** `0o666` | @@ -1881,7 +1881,7 @@ changes: | 1881 | 1881 | * `path` {string|Buffer|URL} | 1882 | 1882 | * `options` {string|Object} | 1883 | 1883 | * `flags` {string} See [support of file system `flags`][]. **Default:** | 1884 | | - `'w'`. | | 1884 | + `'w'`. | 1885 | 1885 | * `encoding` {string} **Default:** `'utf8'` | 1886 | 1886 | * `fd` {integer} **Default:** `null` | 1887 | 1887 | * `mode` {integer} **Default:** `0o666` | @@ -3092,11 +3092,11 @@ when possible prefer streaming via `fs.createReadStream()`. | 3092 | 3092 |
| 3093 | 3093 | 1. Any specified file descriptor has to support reading. | 3094 | 3094 | 2. If a file descriptor is specified as the `path`, it will not be closed | 3095 | | -automatically. | | 3095 | + automatically. | 3096 | 3096 | 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'`. | 3100 | 3100 |
| 3101 | 3101 | ## `fs.readFileSync(path[, options])` | 3102 | 3102 | <!-- YAML | @@ -5135,13 +5135,13 @@ OR of two or more values (e.g. | 5135 | 5135 | `fs.constants.COPYFILE_EXCL | fs.constants.COPYFILE_FICLONE`). | 5136 | 5136 |
| 5137 | 5137 | * `fs.constants.COPYFILE_EXCL`: The copy operation will fail if `dest` already | 5138 | | -exists. | | 5138 | + exists. | 5139 | 5139 | * `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. | 5142 | 5142 | * `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. | 5145 | 5145 |
| 5146 | 5146 | ```js | 5147 | 5147 | const { | @@ -5987,7 +5987,7 @@ string. | 5987 | 5987 | * `'wx'`: Like `'w'` but fails if the path exists. | 5988 | 5988 |
| 5989 | 5989 | * `'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). | 5991 | 5991 |
| 5992 | 5992 | * `'wx+'`: Like `'w+'` but fails if the path exists. | 5993 | 5993 |
| |
Collapse file Copy file name to clipboardExpand all lines: doc/api/http.md +3-3Lines changed: 3 additions & 3 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1984,9 +1984,9 @@ Duplicates in raw headers are handled in the following ways, depending on the | 1984 | 1984 | header name: | 1985 | 1985 |
| 1986 | 1986 | * 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. | 1990 | 1990 | * `set-cookie` is always an array. Duplicates are added to the array. | 1991 | 1991 | * For duplicate `cookie` headers, the values are joined together with '; '. | 1992 | 1992 | * For all other headers, the values are joined together with ', '. | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/http2.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -1402,7 +1402,7 @@ added: v8.4.0 | 1402 | 1402 | * `err` {Error} | 1403 | 1403 | * `pushStream` {ServerHttp2Stream} The returned `pushStream` object. | 1404 | 1404 | * `headers` {HTTP/2 Headers Object} Headers object the `pushStream` was | 1405 | | - initiated with. | | 1405 | + initiated with. | 1406 | 1406 |
| 1407 | 1407 | Initiates a push stream. The callback is invoked with the new `Http2Stream` | 1408 | 1408 | instance created for the push stream passed as the second argument, or an | |
Collapse file Copy file name to clipboardExpand all lines: doc/api/https.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -161,7 +161,7 @@ added: v0.3.4 | 161 | 161 | --> | 162 | 162 |
| 163 | 163 | * `options` {Object} Accepts `options` from [`tls.createServer()`][], | 164 | | - [`tls.createSecureContext()`][] and [`http.createServer()`][]. | | 164 | + [`tls.createSecureContext()`][] and [`http.createServer()`][]. | 165 | 165 | * `requestListener` {Function} A listener to be added to the `'request'` event. | 166 | 166 | * Returns: {https.Server} | 167 | 167 |
| |
Collapse file Copy file name to clipboardExpand all lines: doc/api/modules.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -503,7 +503,7 @@ wrapper that looks like the following: | 503 | 503 | By doing this, Node.js achieves a few things: | 504 | 504 |
| 505 | 505 | * 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. | 507 | 507 | * It helps to provide some global-looking variables that are actually specific | 508 | 508 | to the module, such as: | 509 | 509 | * The `module` and `exports` objects that the implementor can use to export | |
|