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

Added extra 'task_list' option, the html does not preform like github.

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

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

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
48/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ệ
python
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

Bắt đầu trong markdown2.py, khoảng dòng 1689, và kiểm tra việc tạo HTML cho task_list cùng các bài kiểm thử hoặc ví dụ lân cận. So sánh markup của danh sách tác vụ được tạo ra với hành vi của GitHub; được xem là hoàn tất khi các mục chưa chọn và đã chọn được render mà không có ký hiệu danh sách không mong muốn, đồng thời vẫn giữ nguyên văn bản và trạng thái checkbox 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ả

Feature

I add 'task_list' option, and the html performed like this:

    • task list item
      but the github task list item performed like this:
  • task list item
    never mind that I used the wrong markdown syntax to show the result, for I can not insert the image.
    I found the html converted by markdown2 is like blow:
<li><p><input type="checkbox" class="task-list-item-checkbox" %sdisabled>%s</p></li>

and it will be format with the "checked" status and the real text after "- [ ]" or "- [x]", but the above html code can not performed like github, because the task list items at github do not have the list leader, while the list items of above html will have.
I want to make it perform like github, but the generate rule does not leave me any space to make me write the class selector to modify the performance of the items of task list. So I think why not change the generate style to make it performed like github like below:

 return "<li class='task-list-item'>%s</li>\n" % item
//line 1689 at markdown2.py 

So I can write class selector to make it perform like github.

.markdown-body .task-list-item {
  list-style-type: none;
}

or change like blow:

 return "<li style='list-style-type: none;'>%s</li>\n" % item

No need to write CSS handly.

Ngôn ngữ chính
Python
Star
2.8k
Fork
459
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
4

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

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 trentm/python-markdown2

Tất cả issue của trentm/python-markdown2

Issue tương tự

Thêm issue về Python

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.