Skip to content

Commit

Permalink
tools,doc: fix incomplete json produced by doctool
Browse files Browse the repository at this point in the history
Doc tool produces incomplete json when it meets unordered lists that
directly following a heading. Add a default case to processList function
to handle the lists.

PR-URL: #5966
Fixes: #1545
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Robert Lindstädt <[email protected]>
Reviewed-By: Roman Reiss <[email protected]>
  • Loading branch information
firedfox authored and jasnell committed Apr 26, 2016
1 parent e865488 commit 8a19569
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/doc/json.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,14 @@ function processList(section) {
// event: each item is an argument.
section.params = values;
break;

default:
if (section.list.length > 0) {
section.desc = section.desc || [];
for (var i = 0; i < section.list.length; i++) {
section.desc.push(section.list[i]);
}
}
}

// section.listParsed = values;
Expand Down

0 comments on commit 8a19569

Please sign in to comment.