Skip to content

Commit ebc47f8

Browse files
Trottcodebytere
authored andcommitted
doc: remove em dashes
Our documentation uses em dashes inconsistently. They are treated inconsistently typographically too. (For example, they are sometimes surrounded by spaces and sometimes not.) They are also often confused with ordinary hyphens such as in the CHANGELOG, where they are inadvertently mixed together in a single list. The difference is not obvious in the raw markdown but is very noticeable when rendered, appearing to be a typographical error (which it in fact is). The em dash is never needed. There are always alternatives. Remove em dashes entirely. PR-URL: #32080 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> PR-URL: #32146 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Vladimir de Turckheim <[email protected]> Reviewed-By: Stephen Belanger <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Shelley Vohr <[email protected]>
1 parent 5a537ba commit ebc47f8

File tree

14 files changed

+32
-36
lines changed

14 files changed

+32
-36
lines changed

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
Select a Node.js version below to view the changelog history:
44

5-
* [Node.js 12](doc/changelogs/CHANGELOG_V12.md) - **Long Term Support**
6-
* [Node.js 11](doc/changelogs/CHANGELOG_V11.md) - End-of-Life
7-
* [Node.js 10](doc/changelogs/CHANGELOG_V10.md) β€” Long Term Support
8-
* [Node.js 9](doc/changelogs/CHANGELOG_V9.md) β€” End-of-Life
9-
* [Node.js 8](doc/changelogs/CHANGELOG_V8.md) β€” Long Term Support
10-
* [Node.js 7](doc/changelogs/CHANGELOG_V7.md) β€” End-of-Life
11-
* [Node.js 6](doc/changelogs/CHANGELOG_V6.md) β€” End-of-Life
12-
* [Node.js 5](doc/changelogs/CHANGELOG_V5.md) β€” End-of-Life
13-
* [Node.js 4](doc/changelogs/CHANGELOG_V4.md) β€” End-of-Life
14-
* [io.js](doc/changelogs/CHANGELOG_IOJS.md) β€” End-of-Life
15-
* [Node.js 0.12](doc/changelogs/CHANGELOG_V012.md) β€” End-of-Life
16-
* [Node.js 0.10](doc/changelogs/CHANGELOG_V010.md) β€” End-of-Life
5+
* [Node.js 12](doc/changelogs/CHANGELOG_V12.md) **Long Term Support**
6+
* [Node.js 11](doc/changelogs/CHANGELOG_V11.md) End-of-Life
7+
* [Node.js 10](doc/changelogs/CHANGELOG_V10.md) Long Term Support
8+
* [Node.js 9](doc/changelogs/CHANGELOG_V9.md) End-of-Life
9+
* [Node.js 8](doc/changelogs/CHANGELOG_V8.md) End-of-Life
10+
* [Node.js 7](doc/changelogs/CHANGELOG_V7.md) End-of-Life
11+
* [Node.js 6](doc/changelogs/CHANGELOG_V6.md) End-of-Life
12+
* [Node.js 5](doc/changelogs/CHANGELOG_V5.md) End-of-Life
13+
* [Node.js 4](doc/changelogs/CHANGELOG_V4.md) End-of-Life
14+
* [io.js](doc/changelogs/CHANGELOG_IOJS.md) End-of-Life
15+
* [Node.js 0.12](doc/changelogs/CHANGELOG_V012.md) End-of-Life
16+
* [Node.js 0.10](doc/changelogs/CHANGELOG_V010.md) End-of-Life
1717
* [Archive](doc/changelogs/CHANGELOG_ARCHIVE.md)
1818

1919
Please use the following table to find the changelog for a specific Node.js

β€Ždoc/STYLE_GUIDE.mdβ€Ž

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,10 @@
2525
* Outside of the wrapping element if the wrapping element contains only a
2626
fragment of a clause.
2727
* Documents must start with a level-one heading.
28-
* Prefer affixing links to inlining links β€” prefer `[a link][]` to
29-
`[a link](http://example.com)`.
28+
* Prefer affixing links (`[a link][]`) to inlining links
29+
(`[a link](http://example.com)`).
3030
* When documenting APIs, update the YAML comment associated with the API as
3131
appropriate. This is especially true when introducing or deprecating an API.
32-
* Use [Em dashes][] ("β€”" or `Option+Shift+"-"` on macOS) surrounded by spaces,
33-
as per [The New York Times Manual of Style and Usage][].
3432
* For code blocks:
3533
* Use language aware fences. ("```js")
3634
* Code need not be complete. Treat code blocks as an illustration or aid to
@@ -67,9 +65,7 @@
6765

6866
See also API documentation structure overview in [doctools README][].
6967

70-
[Em dashes]: https://en.wikipedia.org/wiki/Dash#Em_dash
7168
[Javascript type]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types#Data_structures_and_types
7269
[serial commas]: https://en.wikipedia.org/wiki/Serial_comma
73-
[The New York Times Manual of Style and Usage]: https://en.wikipedia.org/wiki/The_New_York_Times_Manual_of_Style_and_Usage
7470
[plugin]: https://editorconfig.org/#download
7571
[doctools README]: ../tools/doc/README.md

β€Ždoc/api/addons.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@ require('./build/Release/addon');
313313
Once the source code has been written, it must be compiled into the binary
314314
`addon.node` file. To do so, create a file called `binding.gyp` in the
315315
top-level of the project describing the build configuration of the module
316-
using a JSON-like format. This file is used by [node-gyp][] β€” a tool written
316+
using a JSON-like format. This file is used by [node-gyp][], a tool written
317317
specifically to compile Node.js Addons.
318318

319319
```json

β€Ždoc/api/errors.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,14 +531,14 @@ program. For a comprehensive list, see the [`errno`(3) man page][].
531531
`ulimit -n 2048` in the same shell that will run the Node.js process.
532532

533533
* `ENOENT` (No such file or directory): Commonly raised by [`fs`][] operations
534-
to indicate that a component of the specified pathname does not exist β€” no
534+
to indicate that a component of the specified pathname does not exist. No
535535
entity (file or directory) could be found by the given path.
536536

537537
* `ENOTDIR` (Not a directory): A component of the given pathname existed, but
538538
was not a directory as expected. Commonly raised by [`fs.readdir`][].
539539

540540
* `ENOTEMPTY` (Directory not empty): A directory with entries was the target
541-
of an operation that requires an empty directory β€” usually [`fs.unlink`][].
541+
of an operation that requires an empty directory, usually [`fs.unlink`][].
542542

543543
* `ENOTFOUND` (DNS lookup failed): Indicates a DNS failure of either
544544
`EAI_NODATA` or `EAI_NONAME`. This is not a standard POSIX error.
@@ -553,7 +553,7 @@ program. For a comprehensive list, see the [`errno`(3) man page][].
553553

554554
* `ETIMEDOUT` (Operation timed out): A connect or send request failed because
555555
the connected party did not properly respond after a period of time. Usually
556-
encountered by [`http`][] or [`net`][] β€” often a sign that a `socket.end()`
556+
encountered by [`http`][] or [`net`][]. Often a sign that a `socket.end()`
557557
was not properly called.
558558

559559
## Class: `TypeError`

β€Ždoc/api/http.mdβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ To use the HTTP server and client one must `require('http')`.
99
The HTTP interfaces in Node.js are designed to support many features
1010
of the protocol which have been traditionally difficult to use.
1111
In particular, large, possibly chunk-encoded, messages. The interface is
12-
careful to never buffer entire requests or responses β€” the
12+
careful to never buffer entire requests or responses, so the
1313
user is able to stream data.
1414

1515
HTTP message headers are represented by an object like this:
@@ -879,7 +879,7 @@ added: v0.1.29
879879

880880
Sends a chunk of the body. By calling this method
881881
many times, a request body can be sent to a
882-
server β€” in that case it is suggested to use the
882+
server. In that case, it is suggested to use the
883883
`['Transfer-Encoding', 'chunked']` header line when
884884
creating the request.
885885

@@ -1209,7 +1209,7 @@ added: v0.1.17
12091209

12101210
* Extends: {Stream}
12111211

1212-
This object is created internally by an HTTP server β€” not by the user. It is
1212+
This object is created internally by an HTTP server, not by the user. It is
12131213
passed as the second parameter to the [`'request'`][] event.
12141214

12151215
### Event: `'close'`

β€Ždoc/api/http2.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3020,7 +3020,7 @@ added: v8.4.0
30203020

30213021
* Extends: {Stream}
30223022

3023-
This object is created internally by an HTTP server β€” not by the user. It is
3023+
This object is created internally by an HTTP server, not by the user. It is
30243024
passed as the second parameter to the [`'request'`][] event.
30253025

30263026
#### Event: `'close'`

β€Ždoc/api/modules.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -942,7 +942,7 @@ added: v0.3.7
942942
* {Object}
943943

944944
Provides general utility methods when interacting with instances of
945-
`Module` β€” the `module` variable often seen in file modules. Accessed
945+
`Module`, the `module` variable often seen in file modules. Accessed
946946
via `require('module')`.
947947

948948
### `module.builtinModules`

β€Ždoc/api/net.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ added: v0.1.90
934934
* Returns: {boolean}
935935

936936
Sends data on the socket. The second parameter specifies the encoding in the
937-
case of a string β€” it defaults to UTF8 encoding.
937+
case of a string. It defaults to UTF8 encoding.
938938

939939
Returns `true` if the entire data was flushed successfully to the kernel
940940
buffer. Returns `false` if all or part of the data was queued in user memory.

β€Ždoc/api/path.mdβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ path.parse('/home/user/dir/file.txt');
389389
β”‚ root β”‚ β”‚ name β”‚ ext β”‚
390390
" / home/user/dir / file .txt "
391391
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜
392-
(all spaces in the "" line should be ignored β€” they are purely for formatting)
392+
(All spaces in the "" line should be ignored. They are purely for formatting.)
393393
```
394394

395395
On Windows:
@@ -411,7 +411,7 @@ path.parse('C:\\path\\dir\\file.txt');
411411
β”‚ root β”‚ β”‚ name β”‚ ext β”‚
412412
" C:\ path\dir \ file .txt "
413413
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”˜
414-
(all spaces in the "" line should be ignored β€” they are purely for formatting)
414+
(All spaces in the "" line should be ignored. They are purely for formatting.)
415415
```
416416

417417
A [`TypeError`][] is thrown if `path` is not a string.

β€Ždoc/api/process.mdβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ rejection handler.
190190

191191
There is no notion of a top level for a `Promise` chain at which rejections can
192192
always be handled. Being inherently asynchronous in nature, a `Promise`
193-
rejection can be handled at a future point in time β€” possibly much later than
193+
rejection can be handled at a future point in time, possibly much later than
194194
the event loop turn it takes for the `'unhandledRejection'` event to be emitted.
195195

196196
Another way of stating this is that, unlike in synchronous code where there is

0 commit comments

Comments
Β (0)