Browse Source

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: https://github.com/nodejs/node/pull/5705
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
v4.x
Claudio Rodriguez 9 years ago
committed by Myles Borins
parent
commit
c0a24e4a1d
  1. 15
      doc/api/querystring.markdown

15
doc/api/querystring.markdown

@ -28,15 +28,13 @@ Example:
```js ```js
querystring.parse('foo=bar&baz=qux&baz=quux&corge') querystring.parse('foo=bar&baz=qux&baz=quux&corge')
// returns // returns { foo: 'bar', baz: ['qux', 'quux'], corge: '' }
{ foo: 'bar', baz: ['qux', 'quux'], corge: '' }
// Suppose gbkDecodeURIComponent function already exists, // Suppose gbkDecodeURIComponent function already exists,
// it can decode `gbk` encoding string // it can decode `gbk` encoding string
querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null, querystring.parse('w=%D6%D0%CE%C4&foo=bar', null, null,
{ decodeURIComponent: gbkDecodeURIComponent }) { decodeURIComponent: gbkDecodeURIComponent })
// returns // returns { w: '中文', foo: 'bar' }
{ w: '中文', foo: 'bar' }
``` ```
## querystring.stringify(obj[, sep][, eq][, options]) ## querystring.stringify(obj[, sep][, eq][, options])
@ -52,19 +50,16 @@ Example:
```js ```js
querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' }) querystring.stringify({ foo: 'bar', baz: ['qux', 'quux'], corge: '' })
// returns // returns 'foo=bar&baz=qux&baz=quux&corge='
'foo=bar&baz=qux&baz=quux&corge='
querystring.stringify({foo: 'bar', baz: 'qux'}, ';', ':') querystring.stringify({foo: 'bar', baz: 'qux'}, ';', ':')
// returns // returns 'foo:bar;baz:qux'
'foo:bar;baz:qux'
// Suppose gbkEncodeURIComponent function already exists, // Suppose gbkEncodeURIComponent function already exists,
// it can encode string with `gbk` encoding // it can encode string with `gbk` encoding
querystring.stringify({ w: '中文', foo: 'bar' }, null, null, querystring.stringify({ w: '中文', foo: 'bar' }, null, null,
{ encodeURIComponent: gbkEncodeURIComponent }) { encodeURIComponent: gbkEncodeURIComponent })
// returns // returns 'w=%D6%D0%CE%C4&foo=bar'
'w=%D6%D0%CE%C4&foo=bar'
``` ```
## querystring.unescape ## querystring.unescape

Loading…
Cancel
Save