Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

feat/bug(commonmark] Block elements (including indented code blocks) under list items

Đang mở
#181 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Tái hiện hai ví dụ trong trình soạn thảo, chuyển đổi giữa chế độ rich text và Markdown để quan sát cách các phần tử khối được di chuyển bên trong các mục danh sách. Công việc hoàn tất khi các khối mã và các phần tử khối khác có thể giữ nguyên bên trong các mục danh sách và quá trình round-tripping không còn thay đổi vị trí của chúng.

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

Mô tả

commonmark enhancement

Is your feature request related to a problem? Please describe.
Cannot make block elements under list items (works in old editor)

Example scenarios that aren't working:

(1) (from https://meta.stackexchange.com/a/380355/51) Put in this text

You can solve this in the following ways:

1.     println("Hello, world!")

2.     System.out.println("Hello, world!")

switch to RT and it shows code blocks on new lines after the list items. Switch back and it stays that way in markdown.

screenshot of issue

We could say that if you want a code block inside a list item, you need to use backticks (the commonmark spec does not require indented code blocks in list items, though it is ambiguous). Or we could allow it (preferred, to be same as old editor). But either way, round-trip shouldn't change anything.

(2) From https://meta.stackexchange.com/a/380344/51, notes that the old editor allowed block elements (code block / heading / blockquote / table) inside list items, and the new one pushes them to new lines (as seen in the previous issue). Indeed, the menu items for block elements are turned of in RT mode when the cursor is inside a list item. Would be good if we can add this capability back, for parity. See that post for screenshots.

Ngôn ngữ chính
TypeScript
Star
440
Fork
61
Merge trung bình
19 giờ 52 phút
Pull request đã merge (30 ngày)
23

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của StackExchange/Stacks-Editor

Tất cả issue của StackExchange/Stacks-Editor

Issue tương tự

Thêm issue về TypeScript

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.