feat(55737): JSDoc {@link} support all 4 types of links (#56244)

This commit is contained in:
Oleksandr T
2023-11-17 15:07:48 -08:00
committed by GitHub
parent 4d3418205c
commit f0d2cadd7d
3 changed files with 136 additions and 1 deletions
+2 -1
View File
@@ -2977,7 +2977,8 @@ export function buildLinkParts(link: JSDocLink | JSDocLinkCode | JSDocLinkPlain,
if (text) parts.push(linkTextPart(text));
}
else {
parts.push(linkTextPart(name + (suffix ? "" : " ") + text));
const separator = suffix === 0 || (link.text.charCodeAt(suffix) === CharacterCodes.bar && name.charCodeAt(name.length - 1) !== CharacterCodes.space) ? " " : "";
parts.push(linkTextPart(name + separator + text));
}
}
parts.push(linkPart("}"));