File tree Expand file tree Collapse file tree 2 files changed +13
-28
lines changed
Expand file tree Collapse file tree 2 files changed +13
-28
lines changed Original file line number Diff line number Diff line change 19911991 " String" ,
19921992 " String?" ,
19931993 " Object?" ,
1994- " String|String[]?" ,
19951994 " Function?" ,
19961995 " Function?"
19971996 ],
27342733 ],
27352734 [
27362735 " String|Request" ,
2737- " Object?" ,
2738- " String?" ,
2739- " function(p5.Geometry)?" ,
2740- " function(Event)?" ,
2741- " Boolean?" ,
2742- " Boolean?" ,
2743- " Boolean?"
2736+ " Object?"
27442737 ]
27452738 ]
27462739 },
27692762 [
27702763 " String" ,
27712764 " String?" ,
2772- " Object?" ,
2773- " function(p5.Geometry)?" ,
2774- " function(Event)?" ,
2775- " boolean?" ,
2776- " boolean?" ,
2777- " boolean?"
2765+ " Object?"
27782766 ]
27792767 ]
27802768 },
44744462 " Number" ,
44754463 " Number" ,
44764464 " Number" ,
4477- " Object?" ,
4478- " Number?" ,
4479- " Number?"
4465+ " Object?"
44804466 ]
44814467 ]
44824468 }
Original file line number Diff line number Diff 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// ============================================================================
You can’t perform that action at this time.
0 commit comments