No error for markdown links in @see (#46348)
This only shows up in checkJS files, but should still be ignored.
This commit is contained in:
parent
80e1a29248
commit
d16d7779a8
|
@ -8256,8 +8256,9 @@ namespace ts {
|
|||
}
|
||||
|
||||
function parseSeeTag(start: number, tagName: Identifier, indent?: number, indentText?: string): JSDocSeeTag {
|
||||
const isLink = lookAhead(() => nextTokenJSDoc() === SyntaxKind.AtToken && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && scanner.getTokenValue() === "link");
|
||||
const nameExpression = isLink ? undefined : parseJSDocNameReference();
|
||||
const isMarkdownOrJSDocLink = token() === SyntaxKind.OpenBracketToken
|
||||
|| lookAhead(() => nextTokenJSDoc() === SyntaxKind.AtToken && tokenIsIdentifierOrKeyword(nextTokenJSDoc()) && scanner.getTokenValue() === "link");
|
||||
const nameExpression = isMarkdownOrJSDocLink ? undefined : parseJSDocNameReference();
|
||||
const comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, getNodePos(), indent, indentText) : undefined;
|
||||
return finishNode(factory.createJSDocSeeTag(tagName, nameExpression, comments), start);
|
||||
}
|
||||
|
|
10
tests/baselines/reference/seeTag3.js
Normal file
10
tests/baselines/reference/seeTag3.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
//// [seeTag3.js]
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
}
|
||||
|
||||
|
||||
//// [seeTag3.js]
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
}
|
6
tests/baselines/reference/seeTag3.symbols
Normal file
6
tests/baselines/reference/seeTag3.symbols
Normal file
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/conformance/jsdoc/seeTag3.js ===
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
>theWholeThing : Symbol(theWholeThing, Decl(seeTag3.js, 0, 0))
|
||||
}
|
||||
|
6
tests/baselines/reference/seeTag3.types
Normal file
6
tests/baselines/reference/seeTag3.types
Normal file
|
@ -0,0 +1,6 @@
|
|||
=== tests/cases/conformance/jsdoc/seeTag3.js ===
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
>theWholeThing : () => void
|
||||
}
|
||||
|
7
tests/cases/conformance/jsdoc/seeTag3.ts
Normal file
7
tests/cases/conformance/jsdoc/seeTag3.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
// @outdir: out/
|
||||
// @checkJs: true
|
||||
// @filename: seeTag3.js
|
||||
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
}
|
Loading…
Reference in a new issue