Skip to content

Fix quote toggling around code blocks#3138

Closed
zhailong8845-art wants to merge 1 commit into
stackernews:masterfrom
zhailong8845-art:codex/issue-2862-unwrap-blockquote
Closed

Fix quote toggling around code blocks#3138
zhailong8845-art wants to merge 1 commit into
stackernews:masterfrom
zhailong8845-art:codex/issue-2862-unwrap-blockquote

Conversation

@zhailong8845-art

Copy link
Copy Markdown

Fixes #2862

What changed

When quote formatting is toggled off, unwrap selected top-level quote nodes instead of converting their nested blocks to paragraphs. This preserves nested code blocks and any other child block types while maintaining their order.

Tests

  • npx jest lib/lexical/commands/formatting/blocks.test.js --runInBand (2 passing)
  • npx standard lib/lexical/commands/formatting/blocks.js lib/lexical/commands/formatting/quote.js lib/lexical/commands/formatting/blocks.test.js
  • git diff --check

The regression tests cover the quoted-code reproduction and a mixed code/paragraph quote to ensure unwrapping preserves both type and order.

@huumn huumn closed this Jul 22, 2026
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.

Markdown mode produces illegal block-in-block Lexical nodes

2 participants