summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorfiredfox <wangyang0123@gmail.com>2016-03-31 11:55:59 +0800
committerMyles Borins <mborins@us.ibm.com>2016-04-11 12:12:05 -0400
commit6f0bd64122a8e5b45dd031a96e79208bc9b02150 (patch)
treeb71f862408ead22a2658ae4230b61aeb3cf17328 /tools
parent1994ac09122967b5fbd3a9ec8bd4908a4cb9f074 (diff)
downloadnodejs-6f0bd64122a8e5b45dd031a96e79208bc9b02150.tar.gz
nodejs-6f0bd64122a8e5b45dd031a96e79208bc9b02150.tar.bz2
nodejs-6f0bd64122a8e5b45dd031a96e79208bc9b02150.zip
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>
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/json.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/doc/json.js b/tools/doc/json.js
index a80c7efb1..b2165c15d 100644
--- a/tools/doc/json.js
+++ b/tools/doc/json.js
@@ -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;