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

doc: simplify and correct example descriptions in net.md #32451

Merged
merged 1 commit into from
Mar 26, 2020

Conversation

Trott
Copy link
Member

@Trott Trott commented Mar 24, 2020

Instead of indicating that examples show lines to change in previous
examples, present the examples as standalone items. They suffice on
their own.

In the first of these, it says to change "the second line" of a previous
example, but if it were literally changed to the provided line, it would
result in a syntax error.

In the second of these, it gives the wrong line to change.

All of this is unnecessary and probably makes the examples harder to
follow. So simplify and treat each one as a separate example.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. net Issues and PRs related to the net subsystem. labels Mar 24, 2020
@Trott Trott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Mar 24, 2020
@@ -1064,8 +1064,7 @@ client.on('end', () => {
});
```

To connect on the socket `/tmp/echo.sock` the second line would just be
changed to:
To connect on the socket `/tmp/echo.sock`:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside: gee how I wish we could associate captions with codeblocks...

Instead of indicating that examples show lines to change in previous
examples, present the examples as standalone items. They suffice on
their own.

In the first of these, it says to change "the second line" of a previous
example, but if it were literally changed to the provided line, it would
result in a syntax error.

In the second of these, it gives the wrong line to change.

All of this is unnecessary and probably makes the examples harder to
follow. So simplify and treat each one as a separate example.

PR-URL: nodejs#32451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@Trott
Copy link
Member Author

Trott commented Mar 26, 2020

Landed in f0a33d9

@Trott Trott merged commit f0a33d9 into nodejs:master Mar 26, 2020
@Trott Trott deleted the justify branch March 26, 2020 06:16
MylesBorins pushed a commit that referenced this pull request Mar 26, 2020
Instead of indicating that examples show lines to change in previous
examples, present the examples as standalone items. They suffice on
their own.

In the first of these, it says to change "the second line" of a previous
example, but if it were literally changed to the provided line, it would
result in a syntax error.

In the second of these, it gives the wrong line to change.

All of this is unnecessary and probably makes the examples harder to
follow. So simplify and treat each one as a separate example.

PR-URL: #32451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@MylesBorins MylesBorins mentioned this pull request Mar 26, 2020
targos pushed a commit that referenced this pull request Apr 22, 2020
Instead of indicating that examples show lines to change in previous
examples, present the examples as standalone items. They suffice on
their own.

In the first of these, it says to change "the second line" of a previous
example, but if it were literally changed to the provided line, it would
result in a syntax error.

In the second of these, it gives the wrong line to change.

All of this is unnecessary and probably makes the examples harder to
follow. So simplify and treat each one as a separate example.

PR-URL: #32451
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. doc Issues and PRs related to the documentations. net Issues and PRs related to the net subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants