mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
Address VSCode component of #26415
This commit is contained in:
@@ -16,12 +16,24 @@ export function plain(parts: Proto.SymbolDisplayPart[]): string {
|
||||
|
||||
export function tagsMarkdownPreview(tags: Proto.JSDocTagInfo[]): string {
|
||||
return (tags || [])
|
||||
.map(tag => `*@${tag.name}*` + (tag.text ? ` — ${tag.text}` : ''))
|
||||
.map(tag => {
|
||||
const label = `*@${tag.name}*`;
|
||||
if (!tag.text) {
|
||||
return label;
|
||||
}
|
||||
return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`);
|
||||
})
|
||||
.join(' \n');
|
||||
}
|
||||
|
||||
export function tagsPlainPreview(tags: Proto.JSDocTagInfo[]): string {
|
||||
return (tags || [])
|
||||
.map(tag => `@${tag.name}` + (tag.text ? ` — ${tag.text}` : ''))
|
||||
.map(tag => {
|
||||
const label = `@${tag.name}`;
|
||||
if (!tag.text) {
|
||||
return label;
|
||||
}
|
||||
return label + (tag.text.match(/\r\n|\n/g) ? '\n' + tag.text : ` — ${tag.text}`);
|
||||
})
|
||||
.join('\n');
|
||||
}
|
||||
Reference in New Issue
Block a user