diff --git a/docs/parameterData.json b/docs/parameterData.json index f1b3200da4..fb28f6317d 100644 --- a/docs/parameterData.json +++ b/docs/parameterData.json @@ -1991,7 +1991,6 @@ "String", "String?", "Object?", - "String|String[]?", "Function?", "Function?" ], @@ -2734,13 +2733,7 @@ ], [ "String|Request", - "Object?", - "String?", - "function(p5.Geometry)?", - "function(Event)?", - "Boolean?", - "Boolean?", - "Boolean?" + "Object?" ] ] }, @@ -2769,12 +2762,7 @@ [ "String", "String?", - "Object?", - "function(p5.Geometry)?", - "function(Event)?", - "boolean?", - "boolean?", - "boolean?" + "Object?" ] ] }, @@ -4474,9 +4462,7 @@ "Number", "Number", "Number", - "Object?", - "Number?", - "Number?" + "Object?" ] ] } diff --git a/utils/convert.mjs b/utils/convert.mjs index 52d1303500..9fb921c2a2 100644 --- a/utils/convert.mjs +++ b/utils/convert.mjs @@ -231,23 +231,22 @@ function getParams(entry) { // instead convert it to a string. We want a slightly different conversion to // string, so we match these params to the Documentation.js-provided `params` // array and grab the description from those. - return (entry.tags || []).filter(t => t.title === 'param').map(node => { - const param = entry.params.find(param => param.name === node.name); - if (param) { + return (entry.tags || []) + + // Filter out the nested parameters (eg. options.extrude), + // to be treated as part of parent parameters (eg. options) + // and not separate entries + .filter(t => t.title === 'param' && !t.name.includes('.')) + .map(node => { + const param = (entry.params || []).find(param => param.name === node.name); return { ...node, - description: param.description - }; - } else { - return { - ...node, - description: { + description: param?.description || { type: 'html', value: node.description } }; - } - }); + }); } // ============================================================================