microsoft / microsoft/TypeScript

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

Đang mở
#64,144 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Suggestion
Ngôn ngữ chính
Go
Star
111k
Fork
14.3k
Merge trung bình
2 ngày 4 giờ
Pull request đã merge (30 ngày)
132

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
typescript
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
58/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.