doc: clarify that new URL().port could be an empty string.#22232
doc: clarify that new URL().port could be an empty string.#22232mcollina wants to merge 1 commit intonodejs:masterfrom
Conversation
|
May want to include all of the special cases here: https://url.spec.whatwg.org/#url-miscellaneous |
|
@jasnell PTAL. |
3a3e5a7 to
7fd36cc
Compare
Trott
left a comment
There was a problem hiding this comment.
LGTM if lint-md passes.
@nodejs/documentation
doc/api/url.md
Outdated
There was a problem hiding this comment.
Optional nit: and in that case -> in which case
doc/api/url.md
Outdated
There was a problem hiding this comment.
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. |
BridgeAR
left a comment
There was a problem hiding this comment.
LGTM with the comments addressed.
doc/api/url.md
Outdated
doc/api/url.md
Outdated
There was a problem hiding this comment.
-Otherwise, or i. +I
The sentence seems independent even without the Otherwise.
There was a problem hiding this comment.
Maybe Otherwise, or if the number -> If the resulting number?
doc/api/url.md
Outdated
There was a problem hiding this comment.
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
|
|
||
| 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.
Nit: remove containing a number
There was a problem hiding this comment.
@BridgeAR I disagree, I don't think it's clear enough without that. A string cannot be in a range of numbers.
|
Landed in 2ce0380 |
PR-URL: #22232 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
PR-URL: #22232 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
PR-URL: #22232 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: George Adams <george.adams@uk.ibm.com>
Checklist