Skip to content

Commit 50094de

Browse files
TrottMylesBorins
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]>
1 parent 31ec443 commit 50094de

15 files changed

+34
-38
lines changed

CHANGELOG.md

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22

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

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

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

doc/api/addons.md

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,14 @@ program. For a comprehensive list, see the [`errno`(3) man page][].
533533
`ulimit -n 2048` in the same shell that will run the Node.js process.
534534

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

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

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

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

556556
* `ETIMEDOUT` (Operation timed out): A connect or send request failed because
557557
the connected party did not properly respond after a period of time. Usually
558-
encountered by [`http`][] or [`net`][] — often a sign that a `socket.end()`
558+
encountered by [`http`][] or [`net`][]. Often a sign that a `socket.end()`
559559
was not properly called.
560560

561561
## Class: `TypeError`

doc/api/http.md

+3-3
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:
@@ -882,7 +882,7 @@ added: v0.1.29
882882

883883
Sends a chunk of the body. By calling this method
884884
many times, a request body can be sent to a
885-
server — in that case it is suggested to use the
885+
server. In that case, it is suggested to use the
886886
`['Transfer-Encoding', 'chunked']` header line when
887887
creating the request.
888888

@@ -1214,7 +1214,7 @@ added: v0.1.17
12141214

12151215
* Extends: {Stream}
12161216

1217-
This object is created internally by an HTTP server not by the user. It is
1217+
This object is created internally by an HTTP server, not by the user. It is
12181218
passed as the second parameter to the [`'request'`][] event.
12191219

12201220
### Event: `'close'`

doc/api/http2.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3008,7 +3008,7 @@ added: v8.4.0
30083008

30093009
* Extends: {Stream}
30103010

3011-
This object is created internally by an HTTP server not by the user. It is
3011+
This object is created internally by an HTTP server, not by the user. It is
30123012
passed as the second parameter to the [`'request'`][] event.
30133013

30143014
#### Event: `'close'`

doc/api/modules.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ added: v0.3.7
945945
* {Object}
946946

947947
Provides general utility methods when interacting with instances of
948-
`Module` the `module` variable often seen in file modules. Accessed
948+
`Module`, the `module` variable often seen in file modules. Accessed
949949
via `require('module')`.
950950

951951
### `module.builtinModules`

doc/api/net.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ added: v0.1.90
939939
* Returns: {boolean}
940940

941941
Sends data on the socket. The second parameter specifies the encoding in the
942-
case of a string — it defaults to UTF8 encoding.
942+
case of a string. It defaults to UTF8 encoding.
943943

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

doc/api/path.md

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

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

doc/api/url.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ WHATWG URL's `origin` property includes `protocol` and `host`, but not
4747
├─────────────┴─────────────────────┴────────────────────────┴──────────┴────────────────┴───────┤
4848
│ href │
4949
└────────────────────────────────────────────────────────────────────────────────────────────────┘
50-
(all spaces in the "" line should be ignored — they are purely for formatting)
50+
(All spaces in the "" line should be ignored. They are purely for formatting.)
5151
```
5252

5353
Parsing the URL string using the WHATWG API:

doc/guides/backporting-to-release-lines.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ replace that with the staging branch for the targeted release line.
7575
9. Open a pull request:
7676
1. Be sure to target the `v10.x-staging` branch in the pull request.
7777
1. Include the backport target in the pull request title in the following
78-
format `[v10.x backport] <commit title>`.
78+
format: `[v10.x backport] <commit title>`.
7979
Example: `[v10.x backport] process: improve performance of nextTick`
8080
1. Check the checkbox labeled "Allow edits from maintainers".
8181
1. In the description add a reference to the original PR.

doc/guides/contributing/issues.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ around it. Some contributors may have differing opinions about the issue,
8989
including whether the behavior being seen is a bug or a feature. This discussion
9090
is part of the process and should be kept focused, helpful, and professional.
9191

92-
Short, clipped responsesthat provide neither additional context nor supporting
93-
detailare not helpful or professional. To many, such responses are simply
92+
Short, clipped responses that provide neither additional context nor supporting
93+
detail are not helpful or professional. To many, such responses are simply
9494
annoying and unfriendly.
9595

9696
Contributors are encouraged to help one another make forward progress as much

doc/guides/doc-style-guide.md

+2-6
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/guides/maintaining-icu.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ following the steps above in the prior section of this document ought to be
218218
repeatable without concern for overriding a patch.
219219

220220
2. **Verifiability.** Given the number of files modified in an ICU PR,
221-
a floating patch could easily be missed or dropped altogether next time
221+
a floating patch could easily be missed or dropped altogether next time
222222
something is landed.
223223

224224
3. **Compatibility.** There are a number of ways that ICU can be loaded into

tools/doc/versions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = {
6161
}
6262
}
6363
const ltsRE = /Long Term Support/i;
64-
const versionRE = /\* \[Node\.js ([0-9.]+)\][^-]+[-]\s*(.*)\r?\n/g;
64+
const versionRE = /\* \[Node\.js ([0-9.]+)\]\S+ (.*)\r?\n/g;
6565
_versions = [];
6666
let match;
6767
while ((match = versionRE.exec(changelog)) != null) {

0 commit comments

Comments
 (0)