Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code fence indentation inside JSDoc is removed #56583

Open
trusktr opened this issue Nov 29, 2023 · 3 comments
Open

code fence indentation inside JSDoc is removed #56583

trusktr opened this issue Nov 29, 2023 · 3 comments
Labels
Bug A bug in TypeScript Help Wanted You can do this
Milestone

Comments

@trusktr
Copy link
Contributor

trusktr commented Nov 29, 2023

🔎 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

https://www.typescriptlang.org/play?#code/PQKhCgAIUgBBbAlgD0QO0gWkgFQPIAiek8AhgNYCmkALgBaIDOcSqGNpA5pACYD2kRn3iV66bulp1q-AMaMAdFBixZAG1KNmAZVEcARmurYcDZus3MADgCc+AN0Q9KzUoMTwrRyAANGogAoASh8SUTo+HilSGkhZUgx9agBXfx5lWgF-WPhktRpEL2pbPitKGwKXSD4AM0gEyHRGDjRZahjq1soFSF1qP0CQsPpIjOdGWRtCgr40JWgM0yY4jS1G1xIUdB6AVX9G2LVEKkE+AC5lDJ9rgCtGDIs1gFkATwBhVeZKZBpKNB4dHpSIZKMFIABvDKQSDAYCQBQIjIAXyu10u0GqNnRMGuPjuD0+kFeH0skG+v3+gJoBiMAW0wkoACFNJQSVoghCoTC4Qj5jAURjccpgOBHlSadRwUigA

💻 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

Screenshot 2023-11-28 at 10 12 36 PM

🙂 Expected behavior

Expect the // ... to be properly indented.

Additional information about the issue

Here's another example.

Screenshot 2023-11-28 at 10 15 31 PM

Note that example is using the trick described at #47679 (comment) to make decorators render "properly".

@reduckted
Copy link

I've just noticed this problem and went searching here on GitHub. Is this the same as #43955?

@trusktr
Copy link
Contributor Author

trusktr commented Jan 3, 2024

Looks like it might be the same overall issue, but causes of the problem may vary (f.e. I'm not using <caption>).

@9a8ri3L
Copy link

9a8ri3L commented Feb 3, 2024

I usually get around of this, by at least 5 tabs of tabWidth of 2.

TS Playground

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Help Wanted You can do this
Projects
None yet
Development

No branches or pull requests

4 participants