Skip to content

Commit 3a53c2f

Browse files
zekecodebytere
authored andcommitted
doc: update txt fandamental and ```raw code blocks
These are changed to either ```text or ```console. PR-URL: #33028 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 0e7d26c commit 3a53c2f

File tree

13 files changed

+24
-24
lines changed

13 files changed

+24
-24
lines changed

doc/api/errors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ console.error(err.message);
285285
The `error.stack` property is a string describing the point in the code at which
286286
the `Error` was instantiated.
287287

288-
```txt
288+
```console
289289
Error: Things keep happening!
290290
at /home/gbusey/file.js:525:2
291291
at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21)

doc/api/fs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3544,7 +3544,7 @@ is recommended.
35443544

35453545
For example, given the following directory structure:
35463546

3547-
```fundamental
3547+
```text
35483548
- txtDir
35493549
-- file.txt
35503550
- app.js

doc/api/http.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2049,7 +2049,7 @@ added: v0.1.90
20492049
Request URL string. This contains only the URL that is
20502050
present in the actual HTTP request. If the request is:
20512051

2052-
```txt
2052+
```http
20532053
GET /status?name=ryan HTTP/1.1\r\n
20542054
Accept: text/plain\r\n
20552055
\r\n

doc/api/http2.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3022,7 +3022,7 @@ added: v8.4.0
30223022
Request URL string. This contains only the URL that is
30233023
present in the actual HTTP request. If the request is:
30243024

3025-
```txt
3025+
```http
30263026
GET /status?name=ryan HTTP/1.1\r\n
30273027
Accept: text/plain\r\n
30283028
\r\n
@@ -3038,7 +3038,7 @@ Then `request.url` will be:
30383038
To parse the url into its parts `require('url').parse(request.url)`
30393039
can be used:
30403040

3041-
```txt
3041+
```console
30423042
$ node
30433043
> require('url').parse('/status?name=ryan')
30443044
Url {

doc/api/modules.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ the `require.resolve()` function.
149149
Putting together all of the above, here is the high-level algorithm
150150
in pseudocode of what `require()` does:
151151

152-
```txt
152+
```text
153153
require(X) from module at path Y
154154
1. If X is a core module,
155155
a. return the core module
@@ -409,7 +409,7 @@ example, then `require('./some-library')` would attempt to load:
409409
If these attempts fail, then Node.js will report the entire module as missing
410410
with the default error:
411411

412-
```txt
412+
```console
413413
Error: Cannot find module 'some-library'
414414
```
415415

doc/api/report.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ containing `libuv` handle information and an OS platform information section
503503
showing CPU and memory usage and system limits. An example report can be
504504
triggered using the Node.js REPL:
505505

506-
```raw
506+
```console
507507
$ node
508508
> process.report.writeReport();
509509
Writing Node.js report to file: report.20181126.091102.8480.0.001.json

doc/api/tls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ Reused, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
272272
Node.js is built with a default suite of enabled and disabled TLS ciphers.
273273
Currently, the default cipher suite is:
274274

275-
```txt
275+
```text
276276
TLS_AES_256_GCM_SHA384:
277277
TLS_CHACHA20_POLY1305_SHA256:
278278
TLS_AES_128_GCM_SHA256:

doc/api/tracing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ The available categories are:
3636

3737
By default the `node`, `node.async_hooks`, and `v8` categories are enabled.
3838

39-
```txt
39+
```bash
4040
node --trace-event-categories v8,node,node.async_hooks server.js
4141
```
4242

@@ -45,10 +45,10 @@ flag to enable trace events. This requirement has been removed. However, the
4545
`--trace-events-enabled` flag *may* still be used and will enable the
4646
`node`, `node.async_hooks`, and `v8` trace event categories by default.
4747

48-
```txt
48+
```bash
4949
node --trace-events-enabled
5050

51-
// is equivalent to
51+
# is equivalent to
5252

5353
node --trace-event-categories v8,node,node.async_hooks
5454
```
@@ -74,7 +74,7 @@ The logging file is by default called `node_trace.${rotation}.log`, where
7474
be specified with `--trace-event-file-pattern` that accepts a template
7575
string that supports `${rotation}` and `${pid}`:
7676

77-
```txt
77+
```bash
7878
node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
7979
```
8080

doc/api/url.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ properties of a WHATWG `URL` object.
2929
WHATWG URL's `origin` property includes `protocol` and `host`, but not
3030
`username` or `password`.
3131

32-
```txt
32+
```text
3333
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
3434
│ href │
3535
├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤
@@ -1288,7 +1288,7 @@ located within the structure of the URL.
12881288
Within the Legacy API, spaces (`' '`) and the following characters will be
12891289
automatically escaped in the properties of URL objects:
12901290

1291-
```txt
1291+
```text
12921292
< > " ` \r \n \t { } | \ ^ '
12931293
```
12941294

doc/api/util.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ callbackFunction((err, ret) => {
4242

4343
Will print:
4444

45-
```txt
45+
```text
4646
hello world
4747
```
4848

@@ -93,7 +93,7 @@ debuglog('hello from foo [%d]', 123);
9393
If this program is run with `NODE_DEBUG=foo` in the environment, then
9494
it will output something like:
9595

96-
```txt
96+
```console
9797
FOO 3245: hello from foo [123]
9898
```
9999

@@ -112,7 +112,7 @@ debuglog('hi there, it\'s foo-bar [%d]', 2333);
112112
if it is run with `NODE_DEBUG=foo*` in the environment, then it will output
113113
something like:
114114

115-
```txt
115+
```console
116116
FOO-BAR 3257: hi there, it's foo-bar [2333]
117117
```
118118

0 commit comments

Comments
 (0)