List item ends at a lazy line after a paragraph line indented 4+ columns

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

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

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

2026年11月18日 から。

  • #4254 @hakarrr による — オープン
  • #4260 @Ultroncn による — マージされずにクローズ

評価

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

調査の方向性

The issue points to list() and the indented-code check in src/Tokenizer.ts, and provides a minimal Markdown reproduction. Start by reading those parsing paths and the related case in #4188, then run the parser tests for list items and block quotes. Done means the lazy line remains in the list item paragraph for the reproduction, including the tab and block quote cases; pull request #4254 is already open.

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

説明

Marked version: master (04f1c6e5)

Describe the bug
In a list item, a lazy line after a paragraph line indented 4 or more columns past the item's content ends the list, and the lazy line becomes a separate paragraph. In CommonMark it continues the paragraph in the list item.

When a lazy line comes, list() checks the line before it for the start of a block, and a line indented 4 or more columns counts as indented code. An indented code block can't interrupt a paragraph, though, so that line was paragraph text.

To Reproduce

- a
      foo
bar

The same happens with a tab that reaches that column (- a\n\t foo\nbar), and in a block quote (> - a\n> foo\nbar), where bar leaves the block quote too. #4188 is related (a lazy line after a lazy line) but doesn't change this case.

Expected behavior
bar continues the paragraph in the list item, as foo does.

Found while working on #4222, where it came up in review.

主要言語
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 を短くまとめたダイジェスト。