Skip to content

Commit 4ca3fd0

Browse files
committed
Handle miscs better
1 parent 86d077d commit 4ca3fd0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/doc/json.js

+6
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,9 @@ function finishSection(section, parent) {
368368

369369
if (!section.type) {
370370
section.type = 'module';
371+
if (parent && (parent.type === 'misc')) {
372+
section.type = 'misc';
373+
}
371374
section.displayName = section.name;
372375
section.name = section.name.toLowerCase()
373376
.trim().replace(/\s+/g, '_');
@@ -439,6 +442,9 @@ function finishSection(section, parent) {
439442
case 'miscs':
440443
return;
441444
default:
445+
if (parent.type === 'misc') {
446+
return;
447+
}
442448
if (Array.isArray(k) && parent[k]) {
443449
parent[k] = parent[k].concat(section[k]);
444450
} else if (!parent[k]) {

0 commit comments

Comments
 (0)