Skip to content

Commit 314d168

Browse files
committed
tools,doc: fix incomplete json produced by doc tool
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.
1 parent 7c9a691 commit 314d168

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)