Repository navigation
Conversation
Import already nests block children in a quote: `> ## H2` becomes a QuoteNode holding a HeadingNode, and it round-trips. Typing the same markers did nothing, because a quote created by the default handler holds inline content directly and the shortcut only recognized a ParagraphNode container, so the marker was left as literal text. Accept an inline-content quote as a shortcut container and append the new block to it rather than replacing it, so typing produces the tree import produces. Only leading text is eligible, so a quote that already starts with a block is untouched; shadow root quotes are unaffected because their paragraphs already qualified.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
LeSingh1
requested review from
acywatson,
etrepum,
ivailop7 and
potatowagon
as code owners
August 7, 2026 11:11
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@lexical/mdastalready supports block children inside a blockquote:> ## H2imports as aQuoteNodeholding aHeadingNodeand round-trips exactly, as do> - a,> 1. a,> > xand a fenced block. Typing the same markers did nothing — the marker was left as literal text — because a quote from the default handler holds inline content directly, so the caret's parent is theQuoteNodeand the shortcut only recognized aParagraphNodecontainer.This accepts an inline-content quote as a shortcut container and appends the new block to it instead of replacing it, so typing builds the tree import builds. Only the quote's leading text is eligible, so a quote that already starts with a block is untouched. Shadow root quotes are unaffected — they hold paragraphs, which already qualified. Import, export, and the paragraph path are unchanged.
Adds 5 tests covering heading, bullet list, ordered list, fenced code on Enter, and the leading-text guard.
Companion to the
@lexical/markdownchange for the same report: that package cannot nest a block in a quote, so it declines the shortcut instead; this one can, so it performs it. They are independent — take either, both, or neither.Refs #7407