formatted rendering: keep inline element text on its own line after a block sibling - #111
Merged
sliemeobn merged 3 commits intoAug 24, 2026
Conversation
…lock sibling - PrettyHTMLTextRenderer wrote text/raw/comment straight to output when an inline element followed a block sibling, leaking the text before the element - buffer inline content whenever an inline element is already open, and give trailing inline content its own indented line
…ock-transition points The original fix only forced a line break when closing the parent block tag. Pending inline content (e.g. a <span> following text after a block sibling) still glued onto the next block-start or self-closing tag, since those two call sites forced a break only when isInLineAfterBlockTagOpen was true - exactly the case where there's nothing pending to flush. Hardcode forceLineBreak: true at both remaining call sites; it's a no-op when nothing is buffered and fixes the glueing otherwise.
Vithanco
marked this pull request as ready for review
August 23, 2026 10:28
Collaborator
|
@Vithanco thanks! |
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.
Re-submits the rendering fix from #105.
PrettyHTMLTextRendererbuffers inline content and decides at three call sites whether to force a line break before flushing it.