diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index dc4c0a58170..475216f6e1c 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -7215,6 +7215,7 @@ namespace ts { } function parseJSDocCommentWorker(startOrRanges: number | CommentRange[] = 0, length: number | undefined): JSDoc | undefined { + // const isTripleSlash = Array.isArray(startOrRanges); // TODO: Probably should save a boolean isTripleSlash at the beginning and make all the nested functions change their behaviour. const content = sourceText; // TODO: Why alias this? const comments: string[] = []; @@ -7226,7 +7227,6 @@ namespace ts { const ranges = startOrRanges; let currentTag: JSDocTag | undefined; // TODO: Probably can use tags for (const { pos: start, end } of ranges) { - if (isRecognizedTripleSlashComment(content, start, end)) continue; const length = end - start; scanner.scanRange(start + 3, length - 3, () => { while (nextTokenJSDoc() !== SyntaxKind.EndOfFileToken) { diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 25c1af7fa0f..4a783ebd6e4 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -1111,7 +1111,7 @@ namespace ts { text.charCodeAt(comment.pos + 1) === CharacterCodes.asterisk && text.charCodeAt(comment.pos + 2) === CharacterCodes.asterisk && text.charCodeAt(comment.pos + 3) !== CharacterCodes.slash - || isTripleSlashComment(comment, text)); + || isTripleSlashComment(comment, text) && !isRecognizedTripleSlashComment(text, comment.pos, comment.end)); } export const fullTripleSlashReferencePathRegEx = /^(\/\/\/\s*/;