Skip to content

Commit 7dc28ab

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 <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
1 parent 9c69296 commit 7dc28ab

13 files changed

+24
-24
lines changed

doc/api/errors.md

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -3479,7 +3479,7 @@ is recommended.
34793479

34803480
For example, given the following directory structure:
34813481

3482-
```fundamental
3482+
```text
34833483
- txtDir
34843484
-- file.txt
34853485
- app.js

doc/api/http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1983,7 +1983,7 @@ added: v0.1.90
19831983
Request URL string. This contains only the URL that is
19841984
present in the actual HTTP request. If the request is:
19851985

1986-
```txt
1986+
```http
19871987
GET /status?name=ryan HTTP/1.1\r\n
19881988
Accept: text/plain\r\n
19891989
\r\n

doc/api/http2.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2982,7 +2982,7 @@ added: v8.4.0
29822982
Request URL string. This contains only the URL that is
29832983
present in the actual HTTP request. If the request is:
29842984

2985-
```txt
2985+
```http
29862986
GET /status?name=ryan HTTP/1.1\r\n
29872987
Accept: text/plain\r\n
29882988
\r\n
@@ -2998,7 +2998,7 @@ Then `request.url` will be:
29982998
To parse the url into its parts `require('url').parse(request.url)`
29992999
can be used:
30003000

3001-
```txt
3001+
```console
30023002
$ node
30033003
> require('url').parse('/status?name=ryan')
30043004
Url {

doc/api/modules.md

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

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

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

doc/api/tls.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ Reused, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
276276
Node.js is built with a default suite of enabled and disabled TLS ciphers.
277277
Currently, the default cipher suite is:
278278

279-
```txt
279+
```text
280280
TLS_AES_256_GCM_SHA384:
281281
TLS_CHACHA20_POLY1305_SHA256:
282282
TLS_AES_128_GCM_SHA256:

doc/api/tracing.md

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

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

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

doc/guides/building-node-with-ninja.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ the project's root.
1515
When running `make`, you will see output similar to the following
1616
if the build has succeeded:
1717

18-
```txt
18+
```console
1919
ninja: Entering directory `out/Release`
2020
[4/4] LINK node, POSTBUILDS
2121
```

doc/guides/contributing/pull-requests.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ situation would trigger the breaking change and what is the exact change.
178178

179179
Sample complete commit message:
180180

181-
```txt
181+
```text
182182
subsystem: explain the commit in one line
183183
184184
The body of the commit message should be one or more paragraphs, explaining

doc/guides/releases.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ The `CHANGELOG.md`, `doc/changelogs/CHANGELOG_Vx.md`, `src/node_version.h`, and
344344
`REPLACEME` changes should be the final commit that will be tagged for the
345345
release. When committing these to git, use the following message format:
346346

347-
```txt
347+
```text
348348
YYYY-MM-DD, Version x.y.z (Release Type)
349349
350350
Notable changes:
@@ -357,7 +357,7 @@ For security releases, begin the commit message with the phrase
357357
[distribution indexer](https://github.com/nodejs/nodejs-dist-indexer) to
358358
identify it as such:
359359

360-
```txt
360+
```text
361361
YYYY-MM-DD, Version x.y.z (Release Type)
362362
363363
This is a security release.
@@ -493,7 +493,7 @@ $ git secure-tag <vx.y.z> <commit-sha> -sm "YYYY-MM-DD Node.js vx.y.z (<release-
493493
`release-type` is either "Current" or "LTS". For LTS releases, you should also
494494
include the release codename, for example:
495495

496-
```txt
496+
```text
497497
2019-10-22 Node.js v10.17.0 'Dubnium' (LTS) Release
498498
```
499499

@@ -509,7 +509,7 @@ On release proposal branch, edit `src/node_version.h` again and:
509509

510510
Commit this change with the following commit message format:
511511

512-
```txt
512+
```text
513513
Working on vx.y.z # where 'z' is the incremented patch number
514514
515515
PR-URL: <full URL to your release proposal PR>

0 commit comments

Comments
 (0)