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

Bug in lazy blockquote continuation (or corresponding spec is wrong, whichever)

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

メンテナーはふだん 3 日以内に返信

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

評価

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

調査の方向性

まず、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 を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

commonmark/cmark のほかの issue

commonmark/cmark の issue をすべて見る

似ている issue

C の issue をもっと見る

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

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