From a2e644f364d432537618d9c6e49042dc0065eeef Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Sat, 20 May 2017 23:15:58 +0300 Subject: [PATCH] doc: make the style of notes consistent Make the style of "Note:" paragraphs consistent and document the guidelines in `doc/STYLE_GUIDE.md`. Fixes: https://github.com/nodejs/node/issues/13131 --- doc/STYLE_GUIDE.md | 4 ++ doc/api/addons.md | 4 +- doc/api/buffer.md | 16 +++---- doc/api/child_process.md | 48 +++++++++++---------- doc/api/cli.md | 14 +++---- doc/api/cluster.md | 2 +- doc/api/console.md | 8 ++-- doc/api/crypto.md | 2 +- doc/api/deprecations.md | 12 +++--- doc/api/domain.md | 2 +- doc/api/events.md | 2 +- doc/api/fs.md | 50 +++++++++++----------- doc/api/http.md | 16 +++---- doc/api/modules.md | 21 +++++----- doc/api/n-api.md | 2 +- doc/api/net.md | 15 ++++--- doc/api/os.md | 17 ++++---- doc/api/path.md | 2 +- doc/api/process.md | 90 ++++++++++++++++++++-------------------- doc/api/punycode.md | 2 +- doc/api/querystring.md | 2 +- doc/api/readline.md | 10 ++--- doc/api/stream.md | 52 +++++++++++------------ doc/api/timers.md | 10 ++--- doc/api/tls.md | 75 ++++++++++++++++----------------- doc/api/url.md | 8 ++-- doc/api/util.md | 6 +-- doc/api/v8.md | 4 +- doc/api/vm.md | 8 ++-- doc/api/zlib.md | 8 ++-- doc/releases.md | 5 ++- 31 files changed, 264 insertions(+), 253 deletions(-) diff --git a/doc/STYLE_GUIDE.md b/doc/STYLE_GUIDE.md index b535d2babcdd24..e1c51f74bc4929 100644 --- a/doc/STYLE_GUIDE.md +++ b/doc/STYLE_GUIDE.md @@ -61,6 +61,10 @@ * References to constructor instances should use camelCase. * References to methods should be used with parentheses: for example, `socket.end()` instead of `socket.end`. +* To draw special attention to a note, adhere to the following guidelines: + * Make the "Note:" label bold, i.e. `**Note:**`. + * Use a capital letter after the "Note:" label. + * Preferably, make the note a new paragraph for better visual distinction. [plugin]: http://editorconfig.org/#download [Oxford comma]: https://en.wikipedia.org/wiki/Serial_comma diff --git a/doc/api/addons.md b/doc/api/addons.md index 772c3c77645869..2b8bf57b049aa5 100644 --- a/doc/api/addons.md +++ b/doc/api/addons.md @@ -113,13 +113,13 @@ specifically to compile Node.js Addons. } ``` -*Note: A version of the `node-gyp` utility is bundled and distributed with +**Note:** A version of the `node-gyp` utility is bundled and distributed with Node.js as part of `npm`. This version is not made directly available for developers to use and is intended only to support the ability to use the `npm install` command to compile and install Addons. Developers who wish to use `node-gyp` directly can install it using the command `npm install -g node-gyp`. See the `node-gyp` [installation instructions][] for -more information, including platform-specific requirements.* +more information, including platform-specific requirements. Once the `binding.gyp` file has been created, use `node-gyp configure` to generate the appropriate project build files for the current platform. This diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 9b3f3f8b4b751b..b545db2fb67b2b 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -193,11 +193,11 @@ The character encodings currently supported by Node.js include: * `'hex'` - Encode each byte as two hexadecimal characters. -_Note_: Today's browsers follow the [WHATWG spec] which aliases both 'latin1' and -ISO-8859-1 to win-1252. This means that while doing something like `http.get()`, -if the returned charset is one of those listed in the WHATWG spec it's possible -that the server actually returned win-1252-encoded data, and using `'latin1'` -encoding may incorrectly decode the characters. +**Note:** Today's browsers follow the [WHATWG spec] which aliases both 'latin1' +and ISO-8859-1 to win-1252. This means that while doing something like +`http.get()`, if the returned charset is one of those listed in the WHATWG spec +it's possible that the server actually returned win-1252-encoded data, and +using `'latin1'` encoding may incorrectly decode the characters. ## Buffers and TypedArray -_Note: usage of `util.inherits()` is discouraged. Please use the ES6 `class` and -`extends` keywords to get language level inheritance support. Also note that -the two styles are [semantically incompatible][]._ +**Note:** Usage of `util.inherits()` is discouraged. Please use the ES6 `class` +and `extends` keywords to get language level inheritance support. Also note +that the two styles are [semantically incompatible][]. * `constructor` {Function} * `superConstructor` {Function} diff --git a/doc/api/v8.md b/doc/api/v8.md index 21c2627898e481..0fadfa41742588 100644 --- a/doc/api/v8.md +++ b/doc/api/v8.md @@ -7,7 +7,7 @@ built into the Node.js binary. It can be accessed using: const v8 = require('v8'); ``` -*Note*: The APIs and implementation are subject to change at any time. +**Note:** The APIs and implementation are subject to change at any time. ## v8.cachedDataVersionTag()