microsoft / microsoft/TypeScript

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

Ouverte
#64,144 3 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Suggestion
Langage dominant
Go
Étoiles
111k
Forks
14.3k
Merge moyen
2 j 4 h
PR mergées (30 j)
132

Description

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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
typescript
Domaine
tooling
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
58/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.