Skip to content

Commit 0cc9035

Browse files
committed
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: nodejs#7026 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent 67368d8 commit 0cc9035

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

doc/api/string_decoder.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ internal buffer is used to ensure that the decoded string does not contain
2828
any incomplete multibyte characters. These are held in the buffer until the
2929
next call to `stringDecoder.write()` or until `stringDecoder.end()` is called.
3030

31-
In the following example, the three UTF-8 encoded bytes of the European euro
32-
symbol are written over three separate operations:
31+
In the following example, the three UTF-8 encoded bytes of the European Euro
32+
symbol (``) are written over three separate operations:
3333

3434
```js
3535
const StringDecoder = require('string_decoder').StringDecoder;

doc/api/url.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ The following details each of the components of a parsed URL. The example
2020
illustrate each.
2121

2222
```
23-
+---------------------------------------------------------------------------+
24-
| href |
25-
+----------++-----------+-----------------+-------------------------+-------+
26-
| protocol || auth | host | path | hash |
27-
| || +----------+------+----------+--------------+ |
28-
| || | hostname | port | pathname | search | |
29-
| || | | | +-+------------+ |
30-
| || | | | | | query | |
31-
" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
32-
| || | | | | | | |
33-
+----------++-----------+-----------+------+----------+-+-----------+-------+
23+
┌─────────────────────────────────────────────────────────────────────────────┐
24+
href
25+
├──────────┬┬───────────┬─────────────────┬───────────────────────────┬───────┤
26+
protocol ││ auth host path hash
27+
││ ├──────────┬──────┼──────────┬────────────────┤
28+
││ hostname port pathname search
29+
││ ├─┬──────────────┤
30+
││ │ │ query
31+
" http: // user:pass @ host.com : 8080 /p/a/t/h ? query=string #hash "
32+
││ │ │
33+
└──────────┴┴───────────┴──────────┴──────┴──────────┴─┴──────────────┴───────┘
3434
(all spaces in the "" line should be ignored -- they're purely for formatting)
3535
```
3636

doc/api/util.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ util.isError({ name: 'Error', message: 'an error occurred' });
389389

390390
Note that this method relies on `Object.prototype.toString()` behavior. It is
391391
possible to obtain an incorrect result when the `object` argument manipulates
392-
the `@@toStringTag` or overrides the `toString()` method.
392+
`@@toStringTag`.
393393

394394
```js
395395
const util = require('util');

0 commit comments

Comments
 (0)