Bug in lazy blockquote continuation (or corresponding spec is wrong, whichever)
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
まず、cmark コマンドで 2 つの例を再現し、リンク先の CommonMark 0.27 仕様と、そこでの block quote およびリストの解析を比較します。実装と仕様のどちらが誤っているかを判断し、その後、リグレッションケースを追加して、解決された動作を文書化します。
索引モデルが issue の本文から書いたものです。
説明
Current spec says:
If a string of lines Ls constitute a block
quote with contents Bs, then the result of deleting
the initial [block quote marker] from one or
more lines in which the next [non-whitespace character] after the [block
quote marker] is [paragraph continuation
text] is a block quote with Bs as its content.
http://spec.commonmark.org/0.27/#block-quotes
This spec is clear, and explicit. I see no ambiguity. Now consider this blockquote:
> This is _a_ paragraph continuation text
> 2. because the line starts with `2`, not `1`.
This blockquote is valid, and satisfies the "If a string of lines Ls constitute a block quote with contents Bs" condition. So according to the spec, we can delete the leading >. By doing so we get this:
> This is _a_ paragraph continuation text
2. because the line starts with `2`, not `1`.
This blockquote, according to the spec, must be identical to the former one. However cmark does not agree.
% cmark <<'EOS'
> This is _a_ paragraph continuation text
> 2. because the line starts with `2`, not `1`.
EOS
<blockquote>
<p>This is <em>a</em> paragraph continuation text
2. because the line starts with <code>2</code>, not <code>1</code>.</p>
</blockquote>
% cmark <<'EOS'
> This is _a_ paragraph continuation text
2. because the line starts with `2`, not `1`.
EOS
<blockquote>
<p>This is <em>a</em> paragraph continuation text</p>
</blockquote>
<ol start="2">
<li>because the line starts with <code>2</code>, not <code>1</code>.</li>
</ol>
%
Is it intentional?
- 主要言語
- C
- スター
- 2k
- フォーク
- 702
- 平均マージ
- 2日 17時間
- マージ済み PR(30日)
- 7
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
commonmark/cmark のほかの issue
-
Incorrect `parser->offset` advancement for closing fenced code blocks in `parse_code_block_prefix`対応中かも @cpruijsen が 36 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
commonmark/cmark#590 · コメント 3 件 ·
メンテナーはふだん 3 日以内に返信
-
API documentation is missing an explanation of CMARK_NODE_CUSTOM_BLOCK and CMARK_NODE_CUSTOM_INLINEオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
commonmark/cmark#441 · コメント 2 件 ·
メンテナーはふだん 3 日以内に返信
-
Inline code languageオープン
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
commonmark/cmark#626 · コメント 4 件 ·
メンテナーはふだん 3 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
commonmark/cmark#624 ·
メンテナーはふだん 3 日以内に返信
-
Single-space blank line evicts a list-item continuation再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 65/100
commonmark/cmark#618 ·
メンテナーはふだん 3 日以内に返信
commonmark/cmark の issue をすべて見る
似ている issue
-
Mark ignored Mac OS partitions RecoveryOSContainer and iBootSystemContainer対応中かも @meven が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
storaged-project/udisks#1559 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 71/100
awslabs/aws-checksums#121 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 3 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100