Lazy continuation line inside a quoted list item is parsed as a nested list

オープン
#4,293 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

@amstedy がすでに取り組んでいます。

2026年12月1日 から。

  • #4301 @amstedy による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
markdown, typescript
領域
compilers

調査の方向性

The bug is in the blockquote handling of Tokenizer.ts, where the quoted text is re-lexed as a list using the raw text of the old token. Start by reproducing the > - j followed by - t input and comparing it with the CommonMark output in the issue. Done means the second line stays a lazy paragraph continuation inside the li for the tab, lazy-line, and indented variants, without changing the existing nested-list tests. Check with the maintainers whether they want the spec behavior, since the issue itself raises a possible reason to leave it.

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

説明

L2 - annoying
> - j
    - t

marked 18.x (master dd9fbbe8), gfm on or off:

<blockquote><ul><li>j<ul><li>t</li></ul></li></ul></blockquote>

commonmark.js 0.31 and markdown-it:

<blockquote><ul><li>j
- t</li></ul></blockquote>

The second line has no >, so it can only be a lazy paragraph continuation line, and a lazy line can't open a new block. marked re-lexes it together with the list's raw text (Tokenizer.ts blockquote → this.list(oldToken.raw + '\n' + lines…)), where it reads as an indented sub-item. Same with a tab (> - j\n\t- t) and after another lazy line (> - a\nb\n - c).

Not covered by #4250 or #4290 (I built both). Happy to work on a fix if you want this to follow the spec. I can also see the case for leaving it as is.

主要言語
TypeScript
スター
37.3k
フォーク
3.9k
平均マージ
5日 6時間
マージ済み PR(30日)
62

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

markedjs/marked のほかの issue

markedjs/marked の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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