From aedbfdb33a671e0af94dc7ccbe821015dce58071 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sun, 12 Jan 2020 08:09:26 -0800 Subject: [PATCH] doc: standardize on "host name" in url.md Our docs have a mix of "hostname" and "host name" in prose. Let's follow the usage of Unix man pages, RFCs, and most professionally-edited sources, and use "host name" in prose and "hostname" to refer to the command and in code. Lint rule forthcoming. PR-URL: https://github.com/nodejs/node/pull/31326 Refs: https://github.com/nodejs/node/pull/31073 Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Trivikram Kamat --- doc/api/url.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 0fb6939d4494a4..a198b699cd31d8 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -114,7 +114,7 @@ const myURL = new URL({ toString: () => 'https://example.org/' }); // https://example.org/ ``` -Unicode characters appearing within the hostname of `input` will be +Unicode characters appearing within the host name of `input` will be automatically converted to ASCII using the [Punycode][] algorithm. ```js @@ -192,7 +192,7 @@ Invalid host values assigned to the `host` property are ignored. * {string} -Gets and sets the hostname portion of the URL. The key difference between +Gets and sets the host name portion of the URL. The key difference between `url.host` and `url.hostname` is that `url.hostname` does *not* include the port. @@ -206,7 +206,7 @@ console.log(myURL.href); // Prints https://example.com:81/foo ``` -Invalid hostname values assigned to the `hostname` property are ignored. +Invalid host name values assigned to the `hostname` property are ignored. #### `url.href` @@ -1298,8 +1298,8 @@ path of most URLs. The *fragment percent-encode set* is used for URL fragments. The *C0 control percent-encode set* is used for host and path under certain specific conditions, in addition to all other cases. -When non-ASCII characters appear within a hostname, the hostname is encoded -using the [Punycode][] algorithm. Note, however, that a hostname *may* contain +When non-ASCII characters appear within a host name, the host name is encoded +using the [Punycode][] algorithm. Note, however, that a host name *may* contain *both* Punycode encoded and percent-encoded characters: ```js