From 29200ed0cc96a0348b5d9d76ab91bfe7660e4442 Mon Sep 17 00:00:00 2001 From: Jeremiah Senkpiel Date: Fri, 27 May 2016 15:15:25 -0400 Subject: [PATCH] doc: addresses nits in string_decoder, url, util - Only `@@toStringTag` affects `util.isError()`, this is the reason why it uses `Object.prototype.toString.call(argument)` under the hood. - Shows an actual Euro symbol for reference. - Uses line-drawing characters for the URL chart & fixes the chart borders. PR-URL: https://github.com/nodejs/node/pull/7026 Reviewed-By: James M Snell Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Benjamin Gruenbaum --- doc/api/string_decoder.md | 4 ++-- doc/api/url.md | 22 +++++++++++----------- doc/api/util.md | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/doc/api/string_decoder.md b/doc/api/string_decoder.md index 43ea739f4b5c37..6bd5a57502b82c 100644 --- a/doc/api/string_decoder.md +++ b/doc/api/string_decoder.md @@ -28,8 +28,8 @@ internal buffer is used to ensure that the decoded string does not contain any incomplete multibyte characters. These are held in the buffer until the next call to `stringDecoder.write()` or until `stringDecoder.end()` is called. -In the following example, the three UTF-8 encoded bytes of the European euro -symbol are written over three separate operations: +In the following example, the three UTF-8 encoded bytes of the European Euro +symbol (`€`) are written over three separate operations: ```js const StringDecoder = require('string_decoder').StringDecoder; diff --git a/doc/api/url.md b/doc/api/url.md index d2699272804a04..c041f9bd8f2136 100644 --- a/doc/api/url.md +++ b/doc/api/url.md @@ -20,17 +20,17 @@ The following details each of the components of a parsed URL. The example illustrate each. ``` -+---------------------------------------------------------------------------+ -| href | -+----------++-----------+-----------------+-------------------------+-------+ -| protocol || auth | host | path | hash | -| || +----------+------+----------+--------------+ | -| || | hostname | port | pathname | search | | -| || | | | +-+------------+ | -| || | | | | | query | | -" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash " -| || | | | | | | | -+----------++-----------+-----------+------+----------+-+-----------+-------+ +┌─────────────────────────────────────────────────────────────────────────────┐ +│ href │ +├──────────┬┬───────────┬─────────────────┬───────────────────────────┬───────┤ +│ protocol ││ auth │ host │ path │ hash │ +│ ││ ├──────────┬──────┼──────────┬────────────────┤ │ +│ ││ │ hostname │ port │ pathname │ search │ │ +│ ││ │ │ │ ├─┬──────────────┤ │ +│ ││ │ │ │ │ │ query │ │ +" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash " +│ ││ │ │ │ │ │ │ │ +└──────────┴┴───────────┴──────────┴──────┴──────────┴─┴──────────────┴───────┘ (all spaces in the "" line should be ignored -- they're purely for formatting) ``` diff --git a/doc/api/util.md b/doc/api/util.md index f1245993f033ee..05687698f05f38 100644 --- a/doc/api/util.md +++ b/doc/api/util.md @@ -389,7 +389,7 @@ util.isError({ name: 'Error', message: 'an error occurred' }); Note that this method relies on `Object.prototype.toString()` behavior. It is possible to obtain an incorrect result when the `object` argument manipulates -the `@@toStringTag` or overrides the `toString()` method. +`@@toStringTag`. ```js const util = require('util');