mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 21:55:38 +00:00
Address VSCode component of #26415
This commit is contained in:
parent
ce0c28a6d0
commit
2aa11ada5e
|
@ -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');
|
||||
}
|
Loading…
Reference in a new issue