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

Aperta
#4,253 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@hakarrr ci sta già lavorando.

Dal 18/11/2026.

  • #4254 di @hakarrr — aperta
  • #4260 di @Ultroncn — chiusa senza merge

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
markdown, typescript
Ambito
backend, compilers

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
37.3k
Fork
3.9k
Merge medio
5g 6h
PR unite (30g)
62

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di markedjs/marked

Tutte le issue di markedjs/marked

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.