提交 5767e38c 编写于 作者: M Matt Bierner

Treat single line breaks as spaces in jsdocs. Fixes #28971

上级 f039fd59
......@@ -37,6 +37,7 @@ function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string {
}
export function plainDocumentation(documentation: Proto.SymbolDisplayPart[], tags: Proto.JSDocTagInfo[]): string {
const parts = [plain(documentation), tagsPlainPreview(tags)];
const processedDocumentation = plain(documentation).replace(/\n([ \t]*\n)?/gm, (x) => x.length >= 2 ? '\n\n' : ' ');
const parts = [processedDocumentation, tagsPlainPreview(tags)];
return parts.filter(x => x).join('\n\n');
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册