Handle miscs better

pull/24503/head
isaacs 2012-02-27 11:44:36 -08:00
parent 86d077da00
commit 4ca3fd0a01
1 changed files with 6 additions and 0 deletions

View File

@ -368,6 +368,9 @@ function finishSection(section, parent) {
if (!section.type) {
section.type = 'module';
if (parent && (parent.type === 'misc')) {
section.type = 'misc';
}
section.displayName = section.name;
section.name = section.name.toLowerCase()
.trim().replace(/\s+/g, '_');
@ -439,6 +442,9 @@ function finishSection(section, parent) {
case 'miscs':
return;
default:
if (parent.type === 'misc') {
return;
}
if (Array.isArray(k) && parent[k]) {
parent[k] = parent[k].concat(section[k]);
} else if (!parent[k]) {