@@ -8148,12 +8148,14 @@ namespace ts {
81488148 && nextTokenJSDoc ( ) === SyntaxKind . AtToken
81498149 && tokenIsIdentifierOrKeyword ( nextTokenJSDoc ( ) ) ) {
81508150 const kind = scanner . getTokenValue ( ) ;
8151- if ( kind === "link" || kind === "linkcode" || kind === "linkplain" ) {
8152- return kind ;
8153- }
8151+ if ( isJSDocLinkTag ( kind ) ) return kind ;
81548152 }
81558153 }
81568154
8155+ function isJSDocLinkTag ( kind : string ) {
8156+ return kind === "link" || kind === "linkcode" || kind === "linkplain" ;
8157+ }
8158+
81578159 function parseUnknownTag ( start : number , tagName : Identifier , indent : number , indentText : string ) {
81588160 return finishNode ( factory . createJSDocUnknownTag ( tagName , parseTrailingTagComments ( start , getNodePos ( ) , indent , indentText ) ) , start ) ;
81598161 }
@@ -8276,7 +8278,7 @@ namespace ts {
82768278
82778279 function parseSeeTag ( start : number , tagName : Identifier , indent ?: number , indentText ?: string ) : JSDocSeeTag {
82788280 const isMarkdownOrJSDocLink = token ( ) === SyntaxKind . OpenBracketToken
8279- || lookAhead ( ( ) => nextTokenJSDoc ( ) === SyntaxKind . AtToken && tokenIsIdentifierOrKeyword ( nextTokenJSDoc ( ) ) && scanner . getTokenValue ( ) === "link" ) ;
8281+ || lookAhead ( ( ) => nextTokenJSDoc ( ) === SyntaxKind . AtToken && tokenIsIdentifierOrKeyword ( nextTokenJSDoc ( ) ) && isJSDocLinkTag ( scanner . getTokenValue ( ) ) ) ;
82808282 const nameExpression = isMarkdownOrJSDocLink ? undefined : parseJSDocNameReference ( ) ;
82818283 const comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments ( start , getNodePos ( ) , indent , indentText ) : undefined ;
82828284 return finishNode ( factory . createJSDocSeeTag ( tagName , nameExpression , comments ) , start ) ;
0 commit comments