Skip to content
This repository was archived by the owner on Nov 5, 2021. It is now read-only.

Commit 64504b9

Browse files
author
Your Name
committed
Handle new JSDoc tag format
1 parent ffd28b2 commit 64504b9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/languageFeatures.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -535,9 +535,9 @@ export class SuggestAdapter extends Adapter implements languages.CompletionItemP
535535
function tagToString(tag: ts.JSDocTagInfo): string {
536536
let tagLabel = `*@${tag.name}*`;
537537
if (tag.name === 'param' && tag.text) {
538-
const [paramName, ...rest] = tag.text.split(' ');
539-
tagLabel += `\`${paramName}\``;
540-
if (rest.length > 0) tagLabel += ` — ${rest.join(' ')}`;
538+
const [paramName, ...rest] = tag.text;
539+
tagLabel += `\`${paramName.text}\``;
540+
if (rest.length > 0) tagLabel += ` — ${rest.map(r => r.text).join(' ')}`;
541541
} else if (tag.text) {
542542
tagLabel += ` — ${tag.text}`;
543543
}

0 commit comments

Comments
 (0)