Added extra 'task_list' option, the html does not preform like 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
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ả
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
- 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
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của trentm/python-markdown2
-
Add py.typed marker Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
trentm/python-markdown2#696 ·
-
More XSS's in safe mode Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
trentm/python-markdown2#726 ·
-
Bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
trentm/python-markdown2#707 ·
-
Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
trentm/python-markdown2#688 · 4 bình luận ·
-
Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
trentm/python-markdown2#679 · 2 bình luận ·
Tất cả issue của trentm/python-markdown2
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
stephrobert/dsoxlab#238 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
sublimehq/package_control#1780 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
nwg-piotr/nwg-displays#145 ·