Microsoft/TypeScript

code fence indentation inside JSDoc is removed

Open

#56,583 建立於 2023年11月29日

在 GitHub 查看
 (3 留言) (1 反應) (0 負責人)TypeScript (6,726 fork)batch import
BugDomain: Comment EmitHelp Wanted

倉庫指標

Star
 (48,455 star)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 9 個 PR)

描述

🔎 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

🙂 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".

貢獻者指南