Skip to content

Commit 929b5b9

Browse files
doc: fix multiline return comments in querystring
Changes the multiline return example commments in querystring which have the example out-of-comment, into single comment lines to remain consistent with other docs. PR-URL: #5705 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
1 parent 2e1ae3e commit 929b5b9

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

doc/api/querystring.markdown

+5-10
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ Example:
2828

2929
```js
3030
querystring.parse('foo=bar&baz=qux&baz=quux&corge')
31-
// returns
32-
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
31+
// returns { foo: 'bar', baz: ['qux', 'quux'], corge: '' }
3332

3433
// Suppose gbkDecodeURIComponent function already exists,
3534
// it can decode `gbk` encoding string
3635
querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null,
3736
{ decodeURIComponent: gbkDecodeURIComponent })
38-
// returns
39-
{ w: '中文', foo: 'bar' }
37+
// returns { w: '中文', foo: 'bar' }
4038
```
4139

4240
## querystring.stringify(obj[, sep][, eq][, options])
@@ -52,19 +50,16 @@ Example:
5250

5351
```js
5452
querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' })
55-
// returns
56-
'foo=bar&baz=qux&baz=quux&corge='
53+
// returns 'foo=bar&baz=qux&baz=quux&corge='
5754

5855
querystring.stringify({foo: 'bar', baz: 'qux'}, ';', ':')
59-
// returns
60-
'foo:bar;baz:qux'
56+
// returns 'foo:bar;baz:qux'
6157

6258
// Suppose gbkEncodeURIComponent function already exists,
6359
// it can encode string with `gbk` encoding
6460
querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
6561
{ encodeURIComponent: gbkEncodeURIComponent })
66-
// returns
67-
'w=%D6%D0%CE%C4&foo=bar'
62+
// returns 'w=%D6%D0%CE%C4&foo=bar'
6863
```
6964

7065
## querystring.unescape

0 commit comments

Comments
 (0)