From e9009d973acce35886a204d468aed564fb9a6965 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Mon, 21 Nov 2016 20:46:49 -0800 Subject: [PATCH 1/2] doc: clarify slashes-appending in url module Refs: https://github.com/nodejs/node/issues/9521 --- doc/api/url.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 6d573b4b910f27..d1da889c1e285b 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -154,10 +154,12 @@ 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 any 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`; + * `urlObject.protocol` is `undefined`. * 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` From 0db9107c1bc508fecf5f8f0f38d4311aa77bf8e4 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 22 Nov 2016 14:34:26 -0800 Subject: [PATCH 2/2] squash: remove incorrect bullet point --- doc/api/url.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index d1da889c1e285b..40a3440195e69a 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -154,12 +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 any of the following conditions is true, then 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`; - * `urlObject.protocol` is `undefined`. * 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`