From 4f564e77f7d6f324148b040ace3df459d501a054 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 24 Dec 2019 15:21:27 -0800 Subject: [PATCH] doc,url: use code markup/markdown in headers Backport-PR-URL: https://github.com/nodejs/node/pull/31108 PR-URL: https://github.com/nodejs/node/pull/31086 Reviewed-By: Anna Henningsen Reviewed-By: Ruben Bridgewater --- doc/api/url.md | 108 ++++++++++++++++++++++++------------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/doc/api/url.md b/doc/api/url.md index 80deff6f4b9984..0fb6939d4494a4 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -67,7 +67,7 @@ const myURL = ## The WHATWG URL API -### Class: URL +### Class: `URL` @@ -915,7 +915,7 @@ new URL('file:///hello world').pathname; // Incorrect: /hello%20world fileURLToPath('file:///hello world'); // Correct: /hello world (POSIX) ``` -### url.format(URL\[, options\]) +### `url.format(URL[, options])` @@ -954,7 +954,7 @@ console.log(url.format(myURL, { fragment: false, unicode: true, auth: false })); // Prints 'https://測試/?abc' ``` -### url.pathToFileURL(path) +### `url.pathToFileURL(path)` @@ -993,7 +993,7 @@ changes: The legacy `urlObject` (`require('url').Url`) is created and returned by the `url.parse()` function. -#### urlObject.auth +#### `urlObject.auth` The `auth` property is the username and password portion of the URL, also referred to as _userinfo_. This string subset follows the `protocol` and @@ -1003,35 +1003,35 @@ by `:`. For example: `'user:pass'`. -#### urlObject.hash +#### `urlObject.hash` The `hash` property is the fragment identifier portion of the URL including the leading `#` character. For example: `'#hash'`. -#### urlObject.host +#### `urlObject.host` The `host` property is the full lower-cased host portion of the URL, including the `port` if specified. For example: `'sub.example.com:8080'`. -#### urlObject.hostname +#### `urlObject.hostname` The `hostname` property is the lower-cased host name portion of the `host` component *without* the `port` included. For example: `'sub.example.com'`. -#### urlObject.href +#### `urlObject.href` The `href` property is the full URL string that was parsed with both the `protocol` and `host` components converted to lower-case. For example: `'http://user:pass@sub.example.com:8080/p/a/t/h?query=string#hash'`. -#### urlObject.path +#### `urlObject.path` The `path` property is a concatenation of the `pathname` and `search` components. @@ -1040,7 +1040,7 @@ For example: `'/p/a/t/h?query=string'`. No decoding of the `path` is performed. -#### urlObject.pathname +#### `urlObject.pathname` The `pathname` property consists of the entire path section of the URL. This is everything following the `host` (including the `port`) and before the start @@ -1051,19 +1051,19 @@ For example: `'/p/a/t/h'`. No decoding of the path string is performed. -#### urlObject.port +#### `urlObject.port` The `port` property is the numeric port portion of the `host` component. For example: `'8080'`. -#### urlObject.protocol +#### `urlObject.protocol` The `protocol` property identifies the URL's lower-cased protocol scheme. For example: `'http:'`. -#### urlObject.query +#### `urlObject.query` The `query` property is either the query string without the leading ASCII question mark (`?`), or an object returned by the [`querystring`][] module's @@ -1075,7 +1075,7 @@ For example: `'query=string'` or `{'query': 'string'}`. If returned as a string, no decoding of the query string is performed. If returned as an object, both keys and values are decoded. -#### urlObject.search +#### `urlObject.search` The `search` property consists of the entire "query string" portion of the URL, including the leading ASCII question mark (`?`) character. @@ -1084,13 +1084,13 @@ For example: `'?query=string'`. No decoding of the query string is performed. -#### urlObject.slashes +#### `urlObject.slashes` The `slashes` property is a `boolean` with a value of `true` if two ASCII forward-slash characters (`/`) are required following the colon in the `protocol`. -### url.format(urlObject) +### `url.format(urlObject)`