Added extra 'task_list' option, the html does not preform like github.
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 48/100
調査の方向性
markdown2.py の 1689 行目付近から始め、task_list の HTML 生成と、近くにあるテストまたは例を調べます。生成されたタスクリストのマークアップを GitHub の動作と比較します。未チェックの項目とチェック済みの項目が、テキストとチェックボックスの状態を維持したまま、不要なリストマーカーなしでレンダリングされれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 2.8k
- フォーク
- 459
- 平均マージ
- 2日 19時間
- マージ済み PR(30日)
- 4
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
trentm/python-markdown2 のほかの issue
-
Add py.typed marker オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
trentm/python-markdown2#696 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
trentm/python-markdown2#726 ·
-
Bug
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
trentm/python-markdown2#707 ·
-
Bug
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
trentm/python-markdown2#688 · コメント 4 件 ·
-
Bug
難易度 3/5 1〜2日 初心者へのやさしさ 58/100
trentm/python-markdown2#679 · コメント 2 件 ·
trentm/python-markdown2 の issue をすべて見る
似ている issue
-
agent-ready documentation needs-triage
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
documentation
難易度 1/5 1時間未満 初心者へのやさしさ 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" オープン
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
instance instance add
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
searxng/searx-instances#939 · コメント 1 件 ·
-
area-deployment area-integrations triage:bot-seen
難易度 2/5 半日 初心者へのやさしさ 86/100