Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

started with ------

オープン
#249 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
tooling

調査の方向性

markdown2.py の _extract_metadata から始め、列挙された extras を付けた "------sdfsadfds" の報告された変換を使って IndexError を再現します。先頭に Newline を付けた場合と extras なしの場合と比較します。入力が IndexError なしで変換され、既存の動作が維持されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

It occur error when the markdown text start with '------' and there aren't warp before the '------' .
mymarkdown = markdown2.Markdown( extras=["code-friendly", "code-color", "cuddled-lists", "fenced-code-blocks", "footnotes", "header-ids", "markdown-in-html", "metadata", "nofollow", "numbering", "pyshell", "smarty-pants", "spoiler", "target-blank-links", "toc", "tables", "use-file-vars", "wiki-tables", "xml", "tag-friendly"] ) print mymarkdown.convert("------sdfsadfds")
eg error:
Traceback (most recent call last): File "C:/Users/Administrator/PycharmProjects/teamdoc/website/tests.py", line 9, in <module> print mymarkdown.convert("------sdfsadfds") File "C:\Python27\lib\site-packages\markdown2.py", line 319, in convert text = self._extract_metadata(text) File "C:\Python27\lib\site-packages\markdown2.py", line 414, in _extract_metadata metadata_content = fence_splits[1] IndexError: list index out of range
It works if i add '\n' before the '------'.
eg:
print mymarkdown.convert("\n------sdfsadfds")
It works if i don't open these extras.
eg:
mymarkdown=markdown2.Markdown()

主要言語
Python
スター
2.8k
フォーク
459
平均マージ
2日 19時間
マージ済み PR(30日)
4

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

trentm/python-markdown2 のほかの issue

trentm/python-markdown2 の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。