Skip to content

Commit adfdfdd

Browse files
committed
feat: 优化 jsDoc 多行显示
1 parent 3219897 commit adfdfdd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/printer/JsDoc.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ export class JsDoc {
4242
return [
4343
//
4444
'/**',
45-
...this.lines.map((line) => ` * ${line}`),
45+
...this.lines.map((line) => {
46+
const slices = line.split('\n');
47+
return slices.map((s) => ` * ${s}`).join('\n');
48+
}),
4649
' */',
4750
].join('\n');
4851
}

0 commit comments

Comments
 (0)