microsoft / microsoft/TypeScript
JSDoc tag descriptions lose their indentation.
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.3k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
Does this issue occur when all extensions are disabled?: Yes
Version: 1.76.2
Commit: ee2b180d582a7f601fa6ecfdad8d9fd269ab1884
Date: 2023-03-14T17:47:26.641Z
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Steps to Reproduce:
- Open vscode.dev
- Create a new file and set language mode to JavaScript
- Paste the following:
/**
* This works
* ```
* some
* indentations
* and
* some
* more
* ```
*/
function foo() {}
/**
* @typedef MyObj
* @property {number} foo This doesn't
* ```
* some
* indentations
* and
* some
* more
* ```
*/
const obj = /** @type {MyObj} */ (null);
obj.foo
- Hover over
fooon the last line.
When hovering over foo() it works fine:

But on obj.foo the identation of the code block is lost:

Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the JavaScript/JSDoc reproduction in the issue in vscode.dev, then hover over foo() and obj.foo to compare their rendered descriptions. Investigate the JSDoc tag description path implicated by the @property example. Done means indentation inside the property’s fenced code block is preserved like the standalone description.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100