mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
feat(55737): JSDoc {@link} support all 4 types of links (#56244)
This commit is contained in:
@@ -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("}"));
|
||||
|
||||
Reference in New Issue
Block a user