From 266eebc4e46c2e20d19f1110bb28dd9af0f78469 Mon Sep 17 00:00:00 2001 From: IIITM-Jay Date: Sat, 17 May 2025 00:08:46 +0530 Subject: [PATCH 1/2] Prevent FES from checking nested parameters --- utils/convert.mjs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) 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 } }; - } - }); + }); } // ============================================================================ From ae70e65f598242220f0ad5926c8cbcbe2e759c6d Mon Sep 17 00:00:00 2001 From: IIITM-Jay Date: Sat, 17 May 2025 01:10:24 +0530 Subject: [PATCH 2/2] Added parameterData.json for validation --- docs/parameterData.json | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) 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?" ] ] }