diff options
author | firedfox <wangyang0123@gmail.com> | 2016-03-31 11:55:59 +0800 |
---|---|---|
committer | silverwind <me@silverwind.io> | 2016-04-09 18:34:07 +0200 |
commit | 05d0e9e6a3ae7ed293ea46d0e978eb35a2b5107f (patch) | |
tree | edc6964565c624b4a8558ce055cef111f3e2734b /tools | |
parent | d2577def937a7930d0c8b996983fae28d860090f (diff) | |
download | android-node-v8-05d0e9e6a3ae7ed293ea46d0e978eb35a2b5107f.tar.gz android-node-v8-05d0e9e6a3ae7ed293ea46d0e978eb35a2b5107f.tar.bz2 android-node-v8-05d0e9e6a3ae7ed293ea46d0e978eb35a2b5107f.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.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/doc/json.js b/tools/doc/json.js index a80c7efb1f..b2165c15d2 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; |