Skip to content

Fix quote block indentation bug by accumulating indent values - #82

Open
jwatzman wants to merge 1 commit into
facebook:mainfrom
anserinelabs:quote-block-indentation-bug
Open

Fix quote block indentation bug by accumulating indent values#82
jwatzman wants to merge 1 commit into
facebook:mainfrom
anserinelabs:quote-block-indentation-bug

Conversation

@jwatzman

Copy link
Copy Markdown

Instead of appending a separate indent attribute for each block-level ancestor, accumulate all indent values into a single totalIndent and emit one .indent_internal attribute. This prevents child node indent values (e.g. ParagraphNode's 0) from overwriting parent indent values (e.g. QuoteNode's 1) during attribute merging.

Adds regression test testParagraphInsideQuoteRetainsIndent verifying that text inside a QuoteNode receives the correct headIndent and firstLineHeadIndent from the quote's indent level.

This brings the quote node behavior of lexical-ios to match the behavior of lexical web.

Instead of appending a separate indent attribute for each block-level
ancestor, accumulate all indent values into a single totalIndent and
emit one .indent_internal attribute. This prevents child node indent
values (e.g. ParagraphNode's 0) from overwriting parent indent values
(e.g. QuoteNode's 1) during attribute merging.

Adds regression test testParagraphInsideQuoteRetainsIndent verifying
that text inside a QuoteNode receives the correct headIndent and
firstLineHeadIndent from the quote's indent level.

This brings the quote node behavior of lexical-ios to match the behavior of
lexical web.
@meta-cla meta-cla Bot added the cla signed label Jul 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants