Skip to content

Commit 266eebc

Browse files
committed
Prevent FES from checking nested parameters
1 parent 2a86107 commit 266eebc

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

utils/convert.mjs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -231,23 +231,22 @@ function getParams(entry) {
231231
// instead convert it to a string. We want a slightly different conversion to
232232
// string, so we match these params to the Documentation.js-provided `params`
233233
// array and grab the description from those.
234-
return (entry.tags || []).filter(t => t.title === 'param').map(node => {
235-
const param = entry.params.find(param => param.name === node.name);
236-
if (param) {
234+
return (entry.tags || [])
235+
236+
// Filter out the nested parameters (eg. options.extrude),
237+
// to be treated as part of parent parameters (eg. options)
238+
// and not separate entries
239+
.filter(t => t.title === 'param' && !t.name.includes('.'))
240+
.map(node => {
241+
const param = (entry.params || []).find(param => param.name === node.name);
237242
return {
238243
...node,
239-
description: param.description
240-
};
241-
} else {
242-
return {
243-
...node,
244-
description: {
244+
description: param?.description || {
245245
type: 'html',
246246
value: node.description
247247
}
248248
};
249-
}
250-
});
249+
});
251250
}
252251

253252
// ============================================================================

0 commit comments

Comments
 (0)