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: Fix the typo in example output in url.md for url.hostname #33735

Closed
wants to merge 4 commits into from

Conversation

darkrishabh
Copy link
Contributor

Currently in the url.hostname, the replacement example updates the hostname to use example.com:82 but in the comment it's showing the expected output for the operation to be // Prints https://example.com:81/foo

It should be // Prints https://example.com:82/foo

Checklist
  • documentation is changed or added

@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. url Issues and PRs related to the legacy built-in url module. labels Jun 5, 2020
@DerekNonGeneric
Copy link
Contributor

Notice that you must first run console.log(myURL.href); prior to viewing the expected output.

image

Disagree w/ the changes, but I think this example could be more clear.

@gireeshpunathil gireeshpunathil self-requested a review June 5, 2020 11:32
@gireeshpunathil
Copy link
Member

@DerekNonGeneric - thanks, and you are right. the hostname field is different than the host in that it does not include the port number, and hence changing that does not affect the rest of the url attributes.

@darkrishabh - this change is not correct. At the same time, I guess the doc can be improved to make it more explicit, to avoid confusion. Let me know if you can come up with a sentence.

cjihrig
cjihrig previously approved these changes Jun 5, 2020
@cjihrig cjihrig dismissed their stale review June 5, 2020 12:58

the PR requires additional changes

doc/api/url.md Show resolved Hide resolved
doc/api/url.md Outdated Show resolved Hide resolved
darkrishabh and others added 2 commits July 5, 2020 20:55
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
@darkrishabh
Copy link
Contributor Author

Sorry for picking this up so late, I got involved in some family emergency. I agree with @jasnell and incorporated the change suggested.

doc/api/url.md Outdated Show resolved Hide resolved
@aduh95 aduh95 requested a review from jasnell October 16, 2020 21:10
doc/api/url.md Outdated Show resolved Hide resolved
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@aduh95 aduh95 added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Nov 17, 2020
@aduh95
Copy link
Contributor

aduh95 commented Nov 18, 2020

Landed in 665da27

@aduh95 aduh95 closed this Nov 18, 2020
aduh95 pushed a commit that referenced this pull request Nov 18, 2020
PR-URL: #33735
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
codebytere pushed a commit that referenced this pull request Nov 22, 2020
PR-URL: #33735
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@codebytere codebytere mentioned this pull request Nov 22, 2020
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
PR-URL: #33735
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
BethGriggs pushed a commit that referenced this pull request Dec 10, 2020
PR-URL: #33735
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Dec 10, 2020
BethGriggs pushed a commit that referenced this pull request Dec 15, 2020
PR-URL: #33735
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@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. url Issues and PRs related to the legacy built-in url module.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants