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 1991
1991
" String" ,
1992
1992
" String?" ,
1993
1993
" Object?" ,
1994
- " String|String[]?" ,
1995
1994
" Function?" ,
1996
1995
" Function?"
1997
1996
],
2734
2733
],
2735
2734
[
2736
2735
" String|Request" ,
2737
- " Object?" ,
2738
- " String?" ,
2739
- " function(p5.Geometry)?" ,
2740
- " function(Event)?" ,
2741
- " Boolean?" ,
2742
- " Boolean?" ,
2743
- " Boolean?"
2736
+ " Object?"
2744
2737
]
2745
2738
]
2746
2739
},
2769
2762
[
2770
2763
" String" ,
2771
2764
" String?" ,
2772
- " Object?" ,
2773
- " function(p5.Geometry)?" ,
2774
- " function(Event)?" ,
2775
- " boolean?" ,
2776
- " boolean?" ,
2777
- " boolean?"
2765
+ " Object?"
2778
2766
]
2779
2767
]
2780
2768
},
4474
4462
" Number" ,
4475
4463
" Number" ,
4476
4464
" Number" ,
4477
- " Object?" ,
4478
- " Number?" ,
4479
- " Number?"
4465
+ " Object?"
4480
4466
]
4481
4467
]
4482
4468
}
Original file line number Diff line number Diff line change @@ -231,23 +231,22 @@ function getParams(entry) {
231
231
// instead convert it to a string. We want a slightly different conversion to
232
232
// string, so we match these params to the Documentation.js-provided `params`
233
233
// 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 ) ;
237
242
return {
238
243
...node ,
239
- description : param . description
240
- } ;
241
- } else {
242
- return {
243
- ...node ,
244
- description : {
244
+ description : param ?. description || {
245
245
type : 'html' ,
246
246
value : node . description
247
247
}
248
248
} ;
249
- }
250
- } ) ;
249
+ } ) ;
251
250
}
252
251
253
252
// ============================================================================
You can’t perform that action at this time.
0 commit comments