-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
doc: clarify that new URL().port could be an empty string. #22232
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
Conversation
May want to include all of the special cases here: https://url.spec.whatwg.org/#url-miscellaneous |
@jasnell PTAL. |
3a3e5a7
to
7fd36cc
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if lint-md passes.
@nodejs/documentation
doc/api/url.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional nit: and in that case
-> in which case
doc/api/url.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional nit: Remove the Here are the supported protocols:
sentence and end the previous sentence with :
Not necessarily for this PR but might this material be better closer to this sentence:
|
7fd36cc
to
e0a8408
Compare
@Trott I've applied your nits and do a more substantial change, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with the comments addressed.
doc/api/url.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-and
doc/api/url.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Otherwise, or i
. +I
The sentence seems independent even without the Otherwise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe Otherwise, or if the number
-> If the resulting number
?
doc/api/url.md
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Micro-nit, non-blocking: may be set as either a number or as a string containing a number
-> may be a number or a string containing a number
Left a few more optional nits, but the text looks good to me. Not leaving an approval because I don't know anything about this behavior, although I trust that it is being described accurately. |
e0a8408
to
d5c6eb2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
||
Gets and sets the port portion of the URL. | ||
|
||
The port value may be a number or a string containing a number in the range |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: remove containing a number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BridgeAR I disagree, I don't think it's clear enough without that. A string cannot be in a range of numbers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, you are probably right.
Landed in 2ce0380 |
PR-URL: #22232 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]>
PR-URL: #22232 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]>
PR-URL: #22232 Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: George Adams <[email protected]>
Checklist