From 021f5408e257c9f5cc468e7c97d2b6fc06d68f4e Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Sun, 17 Nov 2024 20:03:18 -0500 Subject: [PATCH] slightly stricter prefix removal in component leading comment so that indentation after an asterisk is preserved --- dash/extract-meta.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dash/extract-meta.js b/dash/extract-meta.js index 7dc226a6e6..7a2acaef51 100755 --- a/dash/extract-meta.js +++ b/dash/extract-meta.js @@ -728,7 +728,7 @@ function gatherComponents(sources, components = {}) { if (propsType) { if ( - propsType.valueDeclaration && + propsType.valueDeclaration && propsType.valueDeclaration.name && propsType.valueDeclaration.name.elements && propsType.valueDeclaration.name.elements.length @@ -762,7 +762,7 @@ function gatherComponents(sources, components = {}) { fullText .slice(r.pos + 4, r.end - 3) .split('\n') - .map(s => s.replace(/^(\s*\*?\s+)/, '')) + .map(s => s.replace(/^(\s*\*?\s)/, '')) .filter(e => e) .join('\n') )