Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 77e145a

Browse filesBrowse files
Trottaddaleax
authored andcommitted
doc: clarify slashes-appending in url module
PR-URL: #9731 Ref: #9521 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 65af114 commit 77e145a
Copy full SHA for 77e145a

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Open diff view settings
Collapse file

‎doc/api/url.md‎

Copy file name to clipboardExpand all lines: doc/api/url.md
+5-4Lines changed: 5 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.