Skip to content

Commit

Permalink
slightly stricter prefix removal in component leading comment
Browse files Browse the repository at this point in the history
so that indentation after an asterisk is preserved
  • Loading branch information
alexcjohnson committed Nov 18, 2024
1 parent 2d27c46 commit 021f540
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dash/extract-meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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')
)
Expand Down

0 comments on commit 021f540

Please sign in to comment.