Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: normalize plaintext code blocks #33028

Closed
wants to merge 16 commits into from
2 changes: 1 addition & 1 deletion doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ console.error(err.message);
The `error.stack` property is a string describing the point in the code at which
the `Error` was instantiated.

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
Error: Things keep happening!
at /home/gbusey/file.js:525:2
at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21)
Expand Down
2 changes: 1 addition & 1 deletion doc/api/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3467,7 +3467,7 @@ is recommended.

For example, given the following directory structure:

```fundamental
```text
- txtDir
-- file.txt
- app.js
Expand Down
2 changes: 1 addition & 1 deletion doc/api/http.md
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,7 @@ added: v0.1.90
Request URL string. This contains only the URL that is
present in the actual HTTP request. If the request is:

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
GET /status?name=ryan HTTP/1.1\r\n
Accept: text/plain\r\n
\r\n
Expand Down
4 changes: 2 additions & 2 deletions doc/api/http2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2983,7 +2983,7 @@ added: v8.4.0
Request URL string. This contains only the URL that is
present in the actual HTTP request. If the request is:

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
GET /status?name=ryan HTTP/1.1\r\n
Accept: text/plain\r\n
\r\n
Expand All @@ -2999,7 +2999,7 @@ Then `request.url` will be:
To parse the url into its parts `require('url').parse(request.url)`
can be used:

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
zeke marked this conversation as resolved.
Show resolved Hide resolved
$ node
> require('url').parse('/status?name=ryan')
Url {
Expand Down
4 changes: 2 additions & 2 deletions doc/api/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ the `require.resolve()` function.
Putting together all of the above, here is the high-level algorithm
in pseudocode of what `require()` does:

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

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
Error: Cannot find module 'some-library'
```

Expand Down
2 changes: 1 addition & 1 deletion doc/api/report.md
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ containing `libuv` handle information and an OS platform information section
showing CPU and memory usage and system limits. An example report can be
triggered using the Node.js REPL:

```raw
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
$ node
> process.report.writeReport();
Writing Node.js report to file: report.20181126.091102.8480.0.001.json
Expand Down
2 changes: 1 addition & 1 deletion doc/api/tls.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ Reused, TLSv1.2, Cipher is ECDHE-RSA-AES128-GCM-SHA256
Node.js is built with a default suite of enabled and disabled TLS ciphers.
Currently, the default cipher suite is:

```txt
```text
TLS_AES_256_GCM_SHA384:
TLS_CHACHA20_POLY1305_SHA256:
TLS_AES_128_GCM_SHA256:
Expand Down
6 changes: 3 additions & 3 deletions doc/api/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The available categories are:

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

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
node --trace-event-categories v8,node,node.async_hooks server.js
```

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

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
node --trace-events-enabled

// is equivalent to
zeke marked this conversation as resolved.
Show resolved Hide resolved
Expand Down Expand Up @@ -74,7 +74,7 @@ The logging file is by default called `node_trace.${rotation}.log`, where
be specified with `--trace-event-file-pattern` that accepts a template
string that supports `${rotation}` and `${pid}`:

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js
```

Expand Down
4 changes: 2 additions & 2 deletions doc/api/url.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ properties of a WHATWG `URL` object.
WHATWG URL's `origin` property includes `protocol` and `host`, but not
`username` or `password`.

```txt
```text
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ href │
├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤
Expand Down Expand Up @@ -1263,7 +1263,7 @@ located within the structure of the URL.
Within the Legacy API, spaces (`' '`) and the following characters will be
automatically escaped in the properties of URL objects:

```txt
```text
< > " ` \r \n \t { } | \ ^ '
```

Expand Down
6 changes: 3 additions & 3 deletions doc/api/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ callbackFunction((err, ret) => {

Will print:

```txt
```text
hello world
```

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

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
FOO 3245: hello from foo [123]
```

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

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
FOO-BAR 3257: hi there, it's foo-bar [2333]
```

Expand Down
2 changes: 1 addition & 1 deletion doc/guides/building-node-with-ninja.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ the project's root.
When running `make`, you will see output similar to the following
if the build has succeeded:

```txt
```text
zeke marked this conversation as resolved.
Show resolved Hide resolved
ninja: Entering directory `out/Release`
[4/4] LINK node, POSTBUILDS
```
Expand Down
2 changes: 1 addition & 1 deletion doc/guides/contributing/pull-requests.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ situation would trigger the breaking change and what is the exact change.

Sample complete commit message:

```txt
```text
subsystem: explain the commit in one line

The body of the commit message should be one or more paragraphs, explaining
Expand Down
8 changes: 4 additions & 4 deletions doc/guides/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ The `CHANGELOG.md`, `doc/changelogs/CHANGELOG_Vx.md`, `src/node_version.h`, and
`REPLACEME` changes should be the final commit that will be tagged for the
release. When committing these to git, use the following message format:

```txt
```text
YYYY-MM-DD, Version x.y.z (Release Type)

Notable changes:
Expand All @@ -355,7 +355,7 @@ For security releases, begin the commit message with the phrase
[distribution indexer](https://github.com/nodejs/nodejs-dist-indexer) to
identify it as such:

```txt
```text
YYYY-MM-DD, Version x.y.z (Release Type)

This is a security release.
Expand Down Expand Up @@ -491,7 +491,7 @@ $ git secure-tag <vx.y.z> <commit-sha> -sm "YYYY-MM-DD Node.js vx.y.z (<release-
`release-type` is either "Current" or "LTS". For LTS releases, you should also
include the release codename, for example:

```txt
```text
2019-10-22 Node.js v10.17.0 'Dubnium' (LTS) Release
```

Expand All @@ -507,7 +507,7 @@ On release proposal branch, edit `src/node_version.h` again and:

Commit this change with the following commit message format:

```txt
```text
Working on vx.y.z # where 'z' is the incremented patch number

PR-URL: <full URL to your release proposal PR>
Expand Down