From 8e3a0d777331d0032a01696db09f758608eea3e8 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 23 Apr 2020 11:01:52 -0700 Subject: [PATCH] doc: update ```txt ```fandamental and ```raw code blocks These are changed to either ```text or ```console. PR-URL: https://github.com/nodejs/node/pull/33028 Reviewed-By: James M Snell Reviewed-By: Ruben Bridgewater --- doc/api/errors.md | 2 +- doc/api/fs.md | 2 +- doc/api/http.md | 2 +- doc/api/http2.md | 4 ++-- doc/api/modules.md | 4 ++-- doc/api/report.md | 2 +- doc/api/tls.md | 2 +- doc/api/tracing.md | 8 ++++---- doc/api/url.md | 4 ++-- doc/api/util.md | 6 +++--- doc/guides/building-node-with-ninja.md | 2 +- doc/guides/contributing/pull-requests.md | 2 +- doc/guides/releases.md | 8 ++++---- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/doc/api/errors.md b/doc/api/errors.md index ff585fda03e01b..0d9d46a88b20c6 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -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 +```console Error: Things keep happening! at /home/gbusey/file.js:525:2 at Frobnicator.refrobulate (/home/gbusey/business-logic.js:424:21) diff --git a/doc/api/fs.md b/doc/api/fs.md index c52c622f07029f..f69b1d090035a1 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3544,7 +3544,7 @@ is recommended. For example, given the following directory structure: -```fundamental +```text - txtDir -- file.txt - app.js diff --git a/doc/api/http.md b/doc/api/http.md index cafaa0dbf3e0e9..436fd9a8204013 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -2049,7 +2049,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 +```http GET /status?name=ryan HTTP/1.1\r\n Accept: text/plain\r\n \r\n diff --git a/doc/api/http2.md b/doc/api/http2.md index 0cccc830698b98..38da6ca8a11de4 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -3022,7 +3022,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 +```http GET /status?name=ryan HTTP/1.1\r\n Accept: text/plain\r\n \r\n @@ -3038,7 +3038,7 @@ Then `request.url` will be: To parse the url into its parts `require('url').parse(request.url)` can be used: -```txt +```console $ node > require('url').parse('/status?name=ryan') Url { diff --git a/doc/api/modules.md b/doc/api/modules.md index 2db91bf797f048..cc19a2dd94eba6 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -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 @@ -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 +```console Error: Cannot find module 'some-library' ``` diff --git a/doc/api/report.md b/doc/api/report.md index 7807063fdc5725..39a4cc91c25141 100644 --- a/doc/api/report.md +++ b/doc/api/report.md @@ -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 +```console $ node > process.report.writeReport(); Writing Node.js report to file: report.20181126.091102.8480.0.001.json diff --git a/doc/api/tls.md b/doc/api/tls.md index 6ff3ad8dacc292..e1af5530963947 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -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: diff --git a/doc/api/tracing.md b/doc/api/tracing.md index 596f624be54246..4a684be4b190e9 100644 --- a/doc/api/tracing.md +++ b/doc/api/tracing.md @@ -36,7 +36,7 @@ The available categories are: By default the `node`, `node.async_hooks`, and `v8` categories are enabled. -```txt +```bash node --trace-event-categories v8,node,node.async_hooks server.js ``` @@ -45,10 +45,10 @@ 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 +```bash node --trace-events-enabled -// is equivalent to +# is equivalent to node --trace-event-categories v8,node,node.async_hooks ``` @@ -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 +```bash node --trace-event-categories v8 --trace-event-file-pattern '${pid}-${rotation}.log' server.js ``` diff --git a/doc/api/url.md b/doc/api/url.md index 1e9649d5b60e04..49dcfbb418bb4f 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -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 │ ├──────────┬──┬─────────────────────┬────────────────────────┬───────────────────────────┬───────┤ @@ -1288,7 +1288,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 { } | \ ^ ' ``` diff --git a/doc/api/util.md b/doc/api/util.md index 567ac5f7523260..d1b0167cfd626b 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -42,7 +42,7 @@ callbackFunction((err, ret) => { Will print: -```txt +```text hello world ``` @@ -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 +```console FOO 3245: hello from foo [123] ``` @@ -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 +```console FOO-BAR 3257: hi there, it's foo-bar [2333] ``` diff --git a/doc/guides/building-node-with-ninja.md b/doc/guides/building-node-with-ninja.md index b4b36f76c6acb2..1b95b6886792da 100644 --- a/doc/guides/building-node-with-ninja.md +++ b/doc/guides/building-node-with-ninja.md @@ -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 +```console ninja: Entering directory `out/Release` [4/4] LINK node, POSTBUILDS ``` diff --git a/doc/guides/contributing/pull-requests.md b/doc/guides/contributing/pull-requests.md index a37929726612d1..f7c76f3324edf9 100644 --- a/doc/guides/contributing/pull-requests.md +++ b/doc/guides/contributing/pull-requests.md @@ -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 diff --git a/doc/guides/releases.md b/doc/guides/releases.md index 327ceb605431fc..9bd0992fcc17d3 100644 --- a/doc/guides/releases.md +++ b/doc/guides/releases.md @@ -344,7 +344,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: @@ -357,7 +357,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. @@ -493,7 +493,7 @@ $ git secure-tag -sm "YYYY-MM-DD Node.js vx.y.z (