-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationHelp WantedYou can do thisYou can do thisVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone
Milestone
Description
From: microsoft/vscode#26415
TypeScript Version: 2.3.2
Code
/**
* @example
* ```
* if (true) {
* foo()
* }
* ```
*/
function foo() {
return '2';
}
Expected behavior:
For the @example
tag, we should return content including any leading whitespace
Actual behavior:
In this case, whitespace is stripped:
[Trace - 3:32:54 PM] Response received: quickinfo (120). Request took 2 ms. Success: true
Result: {
"kind": "function",
"kindModifiers": "",
"start": {
"line": 9,
"offset": 10
},
"end": {
"line": 9,
"offset": 13
},
"displayString": "function foo(): string",
"documentation": "",
"tags": [
{
"name": "example",
"text": "```\nif (true) {\nfoo()\n}\n```"
}
]
}
This results in incorrect rendering of the code example:
jiayihu, sindresorhus, theemj, giggio, CvX and 10 more
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptDomain: JSDocRelates to JSDoc parsing and type generationRelates to JSDoc parsing and type generationHelp WantedYou can do thisYou can do thisVS Code PriorityCritical issues that VS Code needs fixed in the current TypeScript milestoneCritical issues that VS Code needs fixed in the current TypeScript milestone