Skip to content

Commit 77e145a

Browse files
Trottaddaleax
authored andcommitted
doc: clarify slashes-appending in url module
PR-URL: #9731 Ref: #9521 Reviewed-By: Luigi Pinca <[email protected]>
1 parent 65af114 commit 77e145a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

doc/api/url.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,11 @@ The formatting process operates as follows:
154154
[`Error`][] is thrown.
155155
* For all string values of `urlObject.protocol` that *do not end* with an ASCII
156156
colon (`:`) character, the literal string `:` will be appended to `result`.
157-
* If either the `urlObject.slashes` property is true, `urlObject.protocol`
158-
begins with one of `http`, `https`, `ftp`, `gopher`, or `file`, or
159-
`urlObject.protocol` is `undefined`, the literal string `//` will be appended
160-
to `result`.
157+
* If either of the following conditions is true, then the literal string `//`
158+
will be appended to `result`:
159+
* `urlObject.slashes` property is true;
160+
* `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or
161+
`file`;
161162
* If the value of the `urlObject.auth` property is truthy, and either
162163
`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of
163164
`urlObject.auth` will be coerced into a string and appended to `result`

0 commit comments

Comments
 (0)