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: https://github.com/nodejs/node/pull/5966
Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
firedfox 2016-03-31 11:55:59 +08:00 committed by silverwind
parent d2577def93
commit 05d0e9e6a3
No known key found for this signature in database
GPG Key ID: 09623425339D14F7

View File

@ -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;