Merge pull request #81 from spahnke/deprecated-hover-fix

Build tag text correctly for all tags
pull/2748/head
Alexandru Dima 2021-06-11 15:27:15 +02:00 committed by GitHub
commit dda62a58b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -575,6 +575,8 @@ function tagToString(tag: ts.JSDocTagInfo): string {
const [paramName, ...rest] = tag.text;
tagLabel += `\`${paramName.text}\``;
if (rest.length > 0) tagLabel += `${rest.map(r => r.text).join(' ')}`;
} else if (Array.isArray(tag.text)) {
tagLabel += `${tag.text.map(r => r.text).join(' ')}`;
} else if (tag.text) {
tagLabel += `${tag.text}`;
}