Skip to content

Commit 8023e43

Browse files
Maledongtargos
Maledong
authored andcommitted
doc: change the 'txt' to 'console' for a command
This is the document formation, because `node` is a command to be executed, we should reguard it as a command prompt instead of a command txt type. PR-URL: #29389 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent a20a8f4 commit 8023e43

10 files changed

+15
-15
lines changed

doc/api/buffer.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ performance. Use of the `--zero-fill-buffers` option is recommended only when
133133
necessary to enforce that newly allocated `Buffer` instances cannot contain old
134134
data that is potentially sensitive.
135135

136-
```txt
136+
```console
137137
$ node --zero-fill-buffers
138138
> Buffer.allocUnsafe(5);
139139
<Buffer 00 00 00 00 00>

doc/api/cluster.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ if (cluster.isMaster) {
4141

4242
Running Node.js will now share port 8000 between the workers:
4343

44-
```txt
44+
```console
4545
$ node server.js
4646
Master 3596 is running
4747
Worker 4324 started

doc/api/debugger.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Node.js includes an out-of-process debugging utility accessible via a
1111
with the `inspect` argument followed by the path to the script to debug; a
1212
prompt will be displayed indicating successful launch of the debugger:
1313

14-
```txt
14+
```console
1515
$ node inspect myscript.js
1616
< Debugger listening on ws://127.0.0.1:9229/80e7a814-7cd3-49fb-921a-2e02228cd5ba
1717
< For help, see: https://nodejs.org/en/docs/inspector
@@ -42,7 +42,7 @@ console.log('hello');
4242

4343
Once the debugger is run, a breakpoint will occur at line 3:
4444

45-
```txt
45+
```console
4646
$ node inspect myscript.js
4747
< Debugger listening on ws://127.0.0.1:9229/80e7a814-7cd3-49fb-921a-2e02228cd5ba
4848
< For help, see: https://nodejs.org/en/docs/inspector
@@ -124,7 +124,7 @@ on line 1
124124
It is also possible to set a breakpoint in a file (module) that
125125
is not loaded yet:
126126

127-
```txt
127+
```console
128128
$ node inspect main.js
129129
< Debugger listening on ws://127.0.0.1:9229/4e3db158-9791-4274-8909-914f7facf3bd
130130
< For help, see: https://nodejs.org/en/docs/inspector
@@ -183,7 +183,7 @@ e.g. `--inspect=9222` will accept DevTools connections on port 9222.
183183
To break on the first line of the application code, pass the `--inspect-brk`
184184
flag instead of `--inspect`.
185185

186-
```txt
186+
```console
187187
$ node --inspect index.js
188188
Debugger listening on 127.0.0.1:9229.
189189
To start debugging, open the following URL in Chrome:

doc/api/fs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ variable:
8585
Omitting the callback function on asynchronous fs functions is deprecated and
8686
may result in an error being thrown in the future.
8787

88-
```txt
88+
```console
8989
$ cat script.js
9090
function bad() {
9191
require('fs').readFile('/');

doc/api/http.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ Then `request.url` will be:
18531853
To parse the url into its parts `require('url').parse(request.url)`
18541854
can be used:
18551855

1856-
```txt
1856+
```console
18571857
$ node
18581858
> require('url').parse('/status?name=ryan')
18591859
Url {
@@ -1875,7 +1875,7 @@ To extract the parameters from the query string, the
18751875
`require('querystring').parse` function can be used, or
18761876
`true` can be passed as the second argument to `require('url').parse`:
18771877

1878-
```txt
1878+
```console
18791879
$ node
18801880
> require('url').parse('/status?name=ryan', true)
18811881
Url {

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2932,7 +2932,7 @@ To extract the parameters from the query string, the
29322932
`require('querystring').parse` function can be used, or
29332933
`true` can be passed as the second argument to `require('url').parse`.
29342934

2935-
```txt
2935+
```console
29362936
$ node
29372937
> require('url').parse('/status?name=ryan', true)
29382938
Url {

doc/api/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ provided to the `a.js` module.
330330
By the time `main.js` has loaded both modules, they're both finished.
331331
The output of this program would thus be:
332332

333-
```txt
333+
```console
334334
$ node main.js
335335
main starting
336336
a starting

doc/api/process.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ command-line option can be used to suppress the default console output but the
374374
The following example illustrates the warning that is printed to `stderr` when
375375
too many listeners have been added to an event:
376376

377-
```txt
377+
```console
378378
$ node
379379
> events.defaultMaxListeners = 1;
380380
> process.on('foo', () => {});
@@ -386,7 +386,7 @@ detected. 2 foo listeners added. Use emitter.setMaxListeners() to increase limit
386386
In contrast, the following example turns off the default warning output and
387387
adds a custom handler to the `'warning'` event:
388388

389-
```txt
389+
```console
390390
$ node --no-warnings
391391
> const p = process.on('warning', (warning) => console.warn('Do not do that!'));
392392
> events.defaultMaxListeners = 1;

doc/api/repl.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ replServer.defineCommand('saybye', function saybye() {
439439

440440
The new commands can then be used from within the REPL instance:
441441

442-
```txt
442+
```console
443443
> .sayhello Node.js User
444444
Hello, Node.js User!
445445
> .saybye

doc/api/stream.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ rr.on('end', () => {
897897

898898
The output of running this script is:
899899

900-
```txt
900+
```console
901901
$ node test.js
902902
readable: null
903903
end

0 commit comments

Comments
 (0)