Skip to content

Commit d576597

Browse files
committed
fix(generator): multiline comments
1 parent 95cd63e commit d576597

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/generator.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export function generate(node: t.Node | t.PropTypeNode[], options: GenerateOptio
4444
if (!includeJSDoc || !node.jsDoc) {
4545
return '';
4646
}
47-
return `/**\n* ${node.jsDoc}\n*/\n`;
47+
return `/**\n* ${node.jsDoc.split(/\r?\n/).reduce((prev, curr) => prev + '\n* ' + curr)}\n*/\n`;
4848
}
4949

5050
if (Array.isArray(node)) {

0 commit comments

Comments
 (0)