Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't start jsdoc tag before whitespace (#43602)
Fixes #43580
- Loading branch information
Showing
3 changed files
with
212 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
185 changes: 185 additions & 0 deletions
185
tests/baselines/reference/quickInfoJSDocAtBeforeSpace.baseline
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,185 @@ | ||
[ | ||
{ | ||
"marker": { | ||
"fileName": "/tests/cases/fourslash/quickInfoJSDocAtBeforeSpace.ts", | ||
"position": 39, | ||
"name": "f" | ||
}, | ||
"quickInfo": { | ||
"kind": "function", | ||
"kindModifiers": "", | ||
"textSpan": { | ||
"start": 39, | ||
"length": 1 | ||
}, | ||
"displayParts": [ | ||
{ | ||
"text": "function", | ||
"kind": "keyword" | ||
}, | ||
{ | ||
"text": " ", | ||
"kind": "space" | ||
}, | ||
{ | ||
"text": "f", | ||
"kind": "functionName" | ||
}, | ||
{ | ||
"text": "(", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": ")", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": ":", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": " ", | ||
"kind": "space" | ||
}, | ||
{ | ||
"text": "void", | ||
"kind": "keyword" | ||
} | ||
], | ||
"documentation": [], | ||
"tags": [ | ||
{ | ||
"name": "return", | ||
"text": [ | ||
{ | ||
"text": "Don't @ me", | ||
"kind": "text" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"marker": { | ||
"fileName": "/tests/cases/fourslash/quickInfoJSDocAtBeforeSpace.ts", | ||
"position": 87, | ||
"name": "g" | ||
}, | ||
"quickInfo": { | ||
"kind": "function", | ||
"kindModifiers": "", | ||
"textSpan": { | ||
"start": 87, | ||
"length": 1 | ||
}, | ||
"displayParts": [ | ||
{ | ||
"text": "function", | ||
"kind": "keyword" | ||
}, | ||
{ | ||
"text": " ", | ||
"kind": "space" | ||
}, | ||
{ | ||
"text": "g", | ||
"kind": "functionName" | ||
}, | ||
{ | ||
"text": "(", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": ")", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": ":", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": " ", | ||
"kind": "space" | ||
}, | ||
{ | ||
"text": "void", | ||
"kind": "keyword" | ||
} | ||
], | ||
"documentation": [], | ||
"tags": [ | ||
{ | ||
"name": "return", | ||
"text": [ | ||
{ | ||
"text": "One final @", | ||
"kind": "text" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"marker": { | ||
"fileName": "/tests/cases/fourslash/quickInfoJSDocAtBeforeSpace.ts", | ||
"position": 148, | ||
"name": "h" | ||
}, | ||
"quickInfo": { | ||
"kind": "function", | ||
"kindModifiers": "", | ||
"textSpan": { | ||
"start": 148, | ||
"length": 1 | ||
}, | ||
"displayParts": [ | ||
{ | ||
"text": "function", | ||
"kind": "keyword" | ||
}, | ||
{ | ||
"text": " ", | ||
"kind": "space" | ||
}, | ||
{ | ||
"text": "h", | ||
"kind": "functionName" | ||
}, | ||
{ | ||
"text": "(", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": ")", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": ":", | ||
"kind": "punctuation" | ||
}, | ||
{ | ||
"text": " ", | ||
"kind": "space" | ||
}, | ||
{ | ||
"text": "void", | ||
"kind": "keyword" | ||
} | ||
], | ||
"documentation": [], | ||
"tags": [ | ||
{ | ||
"name": "return", | ||
"text": [ | ||
{ | ||
"text": "An @\nBut another line", | ||
"kind": "text" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// <reference path="fourslash.ts" /> | ||
|
||
//// /** | ||
//// * @return Don't @ me | ||
//// */ | ||
//// function /*f*/f() { } | ||
//// /** | ||
//// * @return One final @ | ||
//// */ | ||
//// function /*g*/g() { } | ||
//// /** | ||
//// * @return An @ | ||
//// * But another line | ||
//// */ | ||
//// function /*h*/h() { } | ||
|
||
|
||
verify.baselineQuickInfo() | ||
|