Skip to content

fix: keep text after empty nested blockquote - #4101

Open
Yahiro025 wants to merge 1 commit into
markedjs:masterfrom
Yahiro025:cursor/empty-nested-blockquote-4098-2003
Open

Yahiro025 wants to merge 1 commit into
markedjs:masterfrom
Yahiro025:cursor/empty-nested-blockquote-4098-2003

Conversation

@Yahiro025

Copy link
Copy Markdown

Description

Since 18.0.9 (#4030), text after an empty nested blockquote was dropped. In Tokenizer.blockquote(), the nested-blockquote continuation path appended every leftover line to raw even when the re-tokenized nested quote did not consume them. The lexer then skipped that source, so following paragraphs (and later > quotes) vanished.

This only merges original continuation lines that newToken actually consumed into outer raw/text (leftover count from newText.substring(newToken.raw.length), same idea as the adjacent list branch). Unconsumed lines stay out of this token so the outer lexer can still parse them. Fully consumed continuations stay unchanged.

Fixes #4098.

Checklist

  • Spec fixtures for >>\\ntext, >>>\\ntext, > quote\\n>>\\ntext, and >>\\ntext\\n> more
  • npm test green (specs, unit, lint)

Only append continuation lines that the nested blockquote token actually
consumed, so following paragraphs and blockquotes are not skipped.
@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

@Yahiro025 is attempting to deploy a commit to the MarkedJS Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Sep 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
marked-website Ready Ready Preview Sep 20, 2026 6:49am UTC

Request Review

@UziTech UziTech left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 💯

This branch was successfully deployed

1 active deployment
Preview af4122c4 Deployed Sep 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Text after an empty nested blockquote is dropped (18.0.9+)

2 participants