Skip to content

Commit a2dd848

Browse files
firedfoxMyles Borins
authored and
Myles Borins
committed
tools,doc: fix incomplete json produced by doctool
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]>
1 parent a40d0e8 commit a2dd848

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/doc/json.js

+8
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,14 @@ function processList(section) {
260260
// event: each item is an argument.
261261
section.params = values;
262262
break;
263+
264+
default:
265+
if (section.list.length > 0) {
266+
section.desc = section.desc || [];
267+
for (var i = 0; i < section.list.length; i++) {
268+
section.desc.push(section.list[i]);
269+
}
270+
}
263271
}
264272

265273
// section.listParsed = values;

0 commit comments

Comments
 (0)