microsoft / microsoft/TypeScript

Auto-delete closing tag when opening tag becomes self-closed

Aperta
#64,144 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
2g 4h
PR unite (30g)
132

Descrizione

When I type a paired tag, for example:

```tsx

```

If I then add a slash at the end of the opening tag to make it self-closing:

```tsx

```

The editor leaves the redundant closing tag untouched, resulting in broken/invalid markup.

https://github.com/user-attachments/assets/b4335989-09ba-423c-a79e-3f6a69c0275f

**Expected behavior:**

```tsx

```

https://github.com/user-attachments/assets/b9a5a910-5927-48ff-bbbd-0036d96e03c1

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

Reproduce the issue with the TSX example in the report by adding a slash to the opening tag, then trace the editor behavior responsible for paired-tag handling. Done means converting to without leaving the redundant closing tag; add or run a regression test if the relevant test location is found.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.