Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SectionBuilder flattens BlockSequence without id or styles #673

Merged
merged 1 commit into from
Jan 1, 2025

Conversation

jenshalm
Copy link
Contributor

@jenshalm jenshalm commented Jan 1, 2025

When a BlockSequence neither has an id assigned nor a style, it does not carry any semantics we need to preserve.
In this case we can flatten the structure into the parent container. Previously this cleanup step was performed by all renderers, but by moving it into the SectionBuilder rewrite step we are able to detect headers nested in such a container when building the section structure.

This PR is one of two building blocks to make the bug fix in #670 actually useful.

@jenshalm jenshalm added this to the 1.3.1 milestone Jan 1, 2025
@jenshalm jenshalm merged commit d30a695 into main Jan 1, 2025
21 checks passed
@jenshalm jenshalm deleted the core/flattening-section-builder branch January 1, 2025 13:30
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.

1 participant