From 64504b9ffb88c13d39dbe46b642eabdc7adb7499 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 18 Mar 2021 19:16:15 +0000 Subject: [PATCH] Handle new JSDoc tag format --- src/languageFeatures.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/languageFeatures.ts b/src/languageFeatures.ts index abf50136..a2ae6104 100644 --- a/src/languageFeatures.ts +++ b/src/languageFeatures.ts @@ -535,9 +535,9 @@ export class SuggestAdapter extends Adapter implements languages.CompletionItemP function tagToString(tag: ts.JSDocTagInfo): string { let tagLabel = `*@${tag.name}*`; if (tag.name === 'param' && tag.text) { - const [paramName, ...rest] = tag.text.split(' '); - tagLabel += `\`${paramName}\``; - if (rest.length > 0) tagLabel += ` — ${rest.join(' ')}`; + const [paramName, ...rest] = tag.text; + tagLabel += `\`${paramName.text}\``; + if (rest.length > 0) tagLabel += ` — ${rest.map(r => r.text).join(' ')}`; } else if (tag.text) { tagLabel += ` — ${tag.text}`; }