mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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() {
|
||||
}
|
||||
@@ -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))
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
=== tests/cases/conformance/jsdoc/seeTag3.js ===
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
>theWholeThing : () => void
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
// @outdir: out/
|
||||
// @checkJs: true
|
||||
// @filename: seeTag3.js
|
||||
|
||||
/** @see [The typescript web site](https://typescriptlang.org) */
|
||||
function theWholeThing() {
|
||||
}
|
||||
Reference in New Issue
Block a user