summaryrefslogtreecommitdiff
path: root/doc/api/url.md
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-11-21 20:46:49 -0800
committerRich Trott <rtrott@gmail.com>2016-11-23 20:57:39 -0800
commitc1133f41b6566bc9ce25d4ac0b83f038ccdacc71 (patch)
tree16dd420e9de0bcb7c9ade5235c66c31272c66f69 /doc/api/url.md
parentaa1333ff3b9daedaae90fc9fbf3cd7ffb4feba11 (diff)
downloadandroid-node-v8-c1133f41b6566bc9ce25d4ac0b83f038ccdacc71.tar.gz
android-node-v8-c1133f41b6566bc9ce25d4ac0b83f038ccdacc71.tar.bz2
android-node-v8-c1133f41b6566bc9ce25d4ac0b83f038ccdacc71.zip
doc: clarify slashes-appending in url module
PR-URL: https://github.com/nodejs/node/pull/9731 Ref: https://github.com/nodejs/node/issues/9521 Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'doc/api/url.md')
-rw-r--r--doc/api/url.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/doc/api/url.md b/doc/api/url.md
index 6d573b4b91..40a3440195 100644
--- a/doc/api/url.md
+++ b/doc/api/url.md
@@ -154,10 +154,11 @@ The formatting process operates as follows:
[`Error`][] is thrown.
* For all string values of `urlObject.protocol` that *do not end* with an ASCII
colon (`:`) character, the literal string `:` will be appended to `result`.
-* If either the `urlObject.slashes` property is true, `urlObject.protocol`
- begins with one of `http`, `https`, `ftp`, `gopher`, or `file`, or
- `urlObject.protocol` is `undefined`, the literal string `//` will be appended
- to `result`.
+* If either of the following conditions is true, then the literal string `//`
+ will be appended to `result`:
+ * `urlObject.slashes` property is true;
+ * `urlObject.protocol` begins with `http`, `https`, `ftp`, `gopher`, or
+ `file`;
* If the value of the `urlObject.auth` property is truthy, and either
`urlObject.host` or `urlObject.hostname` are not `undefined`, the value of
`urlObject.auth` will be coerced into a string and appended to `result`