Explicitly add link in JSDoc (#188182)

Fixes #188159
This commit is contained in:
Matt Bierner
2023-07-18 11:15:14 -07:00
committed by GitHub
parent f82185934a
commit 40abe0e1d5

View File

@@ -188,10 +188,10 @@ function convertLinkTags(
if (/^https?:/.test(text)) {
const parts = text.split(' ');
if (parts.length === 1) {
out.push(parts[0]);
out.push(`<${parts[0]}>`);
} else if (parts.length > 1) {
const linkText = escapeMarkdownSyntaxTokensForCode(parts.slice(1).join(' '));
out.push(`[${currentLink.linkcode ? '`' + linkText + '`' : linkText}](${parts[0]})`);
const linkText = parts.slice(1).join(' ');
out.push(`[${currentLink.linkcode ? '`' + escapeMarkdownSyntaxTokensForCode(linkText) + '`' : linkText}](${parts[0]})`);
}
} else {
out.push(escapeMarkdownSyntaxTokensForCode(text));