microsoft / microsoft/TypeScript

code fence indentation inside JSDoc is removed

Aperta
#56,583 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Bug Domain: Comment Emit Help Wanted
Lingua principale
Go
Stelle
111k
Fork
14.4k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

🔎 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 https://github.com/microsoft/TypeScript/issues/47679#issuecomment-1763863693 to make decorators render "properly".

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dagli esempi collegati di TypeScript Playground e riproduci il rendering del blocco di codice JSDoc. Confronta l'indentazione visualizzata con gli snippet del sorgente, quindi verifica che le righe // ... rimangano correttamente indentate in entrambi gli esempi.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript
Ambito
documentation
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.