Skip to content

Commit 6b0c458

Browse files
authored
More flexible reading of component docstrings
To support single-line comments or nonstandard indents
1 parent 9566578 commit 6b0c458

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dash/extract-meta.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ function gatherComponents(sources, components = {}) {
762762
fullText
763763
.slice(r.pos + 4, r.end - 3)
764764
.split('\n')
765-
.map(s => s.slice(3, s.length))
765+
.map(s => s.replace(/^(\s*\*?\s+)/, ''))
766766
.filter(e => e)
767767
.join('\n')
768768
)

0 commit comments

Comments
 (0)