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 <jasnell@gmail.com>
Reviewed-By: Robert Lindstädt <robert.lindstaedt@gmail.com>
Reviewed-By: Roman Reiss <me@silverwind.io>
  • Loading branch information
firedfox authored and silverwind committed Apr 9, 2016
1 parent d2577de commit 05d0e9e
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 05d0e9e

Please sign in to comment.