Angle Brackets Bug
まだ誰も着手していません。
評価
調査の方向性
エントリポイント markdown2.markdown から開始し、safe_mode="escape" と safe_mode="replace" で指定された文字列を再現します。完了条件は、Cコードブロックで小なり記号が保持され、続く引用が両方の該当ケースで独立した Blockquote としてレンダリングされることです。
索引モデルが issue の本文から書いたものです。
説明
I noticed that in some scenarios, this bug can occur:
Suppose your string is the following:
>>> string = """
... Start of test.
...
... for (i=0; i<3; i++) {
... printf("Hello, world.");
... }
...
... > This is a quote
...
... End of test.
... """
I would expect the C-code snippet to be formatted as a code block, and the quote to be formatted as a blockquote.
However, when I use safe_mode="escape" (because I want users of this to be able to use HTML in the application), markdown2 thinks that there is a big HTML tag in this block from the less than symbol to the beginning of the blockquote:
>>> import markdown2
>>> markdown2.markdown(string, safe_mode="escape")
'<p>Start of test.</p>\n\n<pre><code>for (i=0; i<3; i++) {\n printf("Hello, world.");\n } \n\n> This is a quote\n</code></pre>\n\n<p>End of test.</p>\n'
>>> markdown2.markdown(string, safe_mode="replace")
'<p>Start of test.</p>\n\n<pre><code>for (i=0; i[HTML_REMOVED] This is a quote\n</code></pre>\n\n<p>End of test.</p>\n'
>>>
This seems to be a bug, because it means I cannot have a blockquote after a block of code that uses a < symbol.
- 主要言語
- Python
- スター
- 2.8k
- フォーク
- 459
- 平均マージ
- 2日 14時間
- マージ済み PR(30日)
- 5
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- 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
-
docs pydanty:is-working
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
pydantic/pydantic-ai#8863 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
run-llama/llama_index#23278 ·
メンテナーはふだん 2 日以内に返信
-
documentation from-review-extraction github-actions priority: low severity:nit
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
LearningCircuit/local-deep-research#6946 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
oracle/langchain-oracle#323 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
tenstorrent/tt-metal#58057 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信