Fix indented writer misaligning End tags after Comment + Text - #996
Draft
dralley wants to merge 2 commits into
Draft
Fix indented writer misaligning End tags after Comment + Text #996dralley wants to merge 2 commits into
dralley wants to merge 2 commits into
Conversation
dralley
force-pushed
the
writer-indentation
branch
from
July 30, 2026 21:39
05b0d27 to
e0f60bf
Compare
When an element contained a non-text child (e.g. Comment) followed by a Text event, the closing End tag lost its line break because Text unconditionally cleared should_line_break. Track the indent level of the most recent non-text event and force a line break for the End tag when that level is deeper than the current level after shrink. closes tafia#276
dralley
force-pushed
the
writer-indentation
branch
from
July 30, 2026 21:45
e0f60bf to
4fb1699
Compare
Collaborator
Author
|
Unless I mark it ready for review, it's not ready yet! |
dralley
force-pushed
the
writer-indentation
branch
from
July 30, 2026 22:00
d80502f to
cda93fc
Compare
Collaborator
Author
|
To be clear, I'm still experimenting with this. |
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.
When an element contained a non-text child (e.g. Comment) followed by a
Text event, the closing End tag lost its line break because Text
unconditionally cleared should_line_break. Track the indent level of the
most recent non-text event and force a line break for the End tag when
that level is deeper than the current level after shrink.
closes #276