Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools,doc: fix json result of grouped optional params #5977

Conversation

firedfox
Copy link
Contributor

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with
    this change (including linting)?
  • Is the commit message formatted according to CONTRIBUTING.md?
  • If this change fixes a bug (or a performance problem), is a regression
    test (or a benchmark) included?
  • Is a documentation update included (if this change modifies
    existing APIs, or introduces new ones)?

Affected core subsystem(s)

  • tools, doc

Description of change

fixes #5976

@mscdex mscdex added doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory. labels Mar 31, 2016
@@ -1342,7 +1342,7 @@ The synchronous version of [`fs.writeFile()`][]. Returns `undefined`.
## fs.writeSync(fd, data[, position[, encoding]])

* `fd` {Integer}
* `buffer` {String | Buffer}
* `data` {String | Buffer}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should probably go in a different PR. Good catch though :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make another PR for it. It was found while testing this patch :D Thanks!

@firedfox firedfox force-pushed the fix-json-result-of-grouped-optional-params branch from 8b0b25a to 78715c4 Compare April 1, 2016 04:31
@firedfox
Copy link
Contributor Author

firedfox commented Apr 1, 2016

The commit has been amended. Please review again.

@benjamingr
Copy link
Member

Generally LGTM, would be nice to add a comment above it to explain that it's there to address optional parameters that are grouped.

@firedfox firedfox force-pushed the fix-json-result-of-grouped-optional-params branch from 78715c4 to 23b3421 Compare April 1, 2016 10:34
@firedfox
Copy link
Contributor Author

firedfox commented Apr 1, 2016

Sure! The comment has been added. Thank you!

@jasnell
Copy link
Member

jasnell commented Apr 1, 2016

LGTM if @nodejs/documentation is happy

@eljefedelrodeodeljefe
Copy link
Contributor

LGTM. Minor nit: could you post the difference of the JSON? Good work on the tooling @firedfox !

@firedfox
Copy link
Contributor Author

firedfox commented Apr 1, 2016

Sure! This is the diff result of all.markdown: http://106.187.89.52/tmp/dbc33ac-doc-json-all.diff.html

// for grouped optional params such as someMethod(a[, b[, c]])
var pos;
for (pos = 0; pos < p.length; pos++) {
if ('[ ]'.indexOf(p[pos]) === -1) { break; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use optionalCharDict itself, to check if the current char is in it or not.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! Thanks!

Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]])
@firedfox firedfox force-pushed the fix-json-result-of-grouped-optional-params branch from 23b3421 to e94fe00 Compare April 2, 2016 13:15
@firedfox
Copy link
Contributor Author

firedfox commented Apr 2, 2016

Updated. Thanks guys! It looks much better than my first commit.

@jasnell
Copy link
Member

jasnell commented Apr 4, 2016

@thefourtheye ... ping

@benjamingr
Copy link
Member

LGTM

@silverwind
Copy link
Contributor

Thanks! Landed in 6222e5b.

@silverwind silverwind closed this Apr 9, 2016
silverwind pushed a commit that referenced this pull request Apr 9, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 20, 2016
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
This was referenced Apr 21, 2016
jasnell pushed a commit that referenced this pull request Apr 26, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 3, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 6, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 18, 2016
Current tools/doc/json.js only supports one bracket style for optional
params methodName(param0[,param1],param2). Add support to other styles
such as methodName(param0,[param1,]param2) or
methodName(param0[,param1,param2]) or
methodName(param0[,param1[,param2]]).

PR-URL: #5977
Fixes: #5976
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. tools Issues and PRs related to the tools directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The current json doctool does not support grouped optional params
8 participants