microsoft / microsoft/TypeScript
code fence indentation inside JSDoc is removed
Open
Nobody has claimed this yet.
Bug
Domain: Comment Emit
Help Wanted
- Dominant language
- Go
- Stars
- 111k
- Forks
- 14.4k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 117
Description
🔎 Search Terms
github typescript code fence indentation
🕗 Version & Regression Information
- This is a crash
- This changed between versions ______ and _______
- This changed in commit or PR _______
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
- I was unable to test this on prior versions because time_
⏯ Playground Link
💻 Code
/**
* @mixin - TODO make this @mixin tag do something in the docs.
* @class Settable - This class provides a simple `set()` method that can be used
* to set multiple properties of an instance at once. See `set()` method
* description.
*
* This class is a mixin. Use it like so:
*
* ```js
* class MyClass extends Settable() {
* // ...
* }
* ```
*
* or
*
* ```js
* class MyClass extends Settable(SomeBaseClass) {
* // ...
* }
* ```
*/
class Settable {}
🙁 Actual behavior
🙂 Expected behavior
Expect the // ... to be properly indented.
Additional information about the issue
Here's another example.
Note that example is using the trick described at https://github.com/microsoft/TypeScript/issues/47679#issuecomment-1763863693 to make decorators render "properly".
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
Start with the linked TypeScript Playground examples and reproduce the JSDoc code-fence rendering. Compare the displayed indentation with the source snippets, then verify that the // ... lines remain properly indented in both examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100