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

Aperta
#4,293 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 4 giorni

@amstedy ci sta già lavorando.

Dal 1/12/2026.

  • #4301 di @amstedy — aperta

Valutazione

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

Direzione di ricerca

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.

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

Descrizione

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.

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.