Fix calculate_content_widths when inline boxes immediately follow a hard/explicit newline - #746
Merged
nicoburns merged 5 commits intoSep 3, 2026
Conversation
DJMcNab
reviewed
Aug 14, 2026
DJMcNab
left a comment
Member
There was a problem hiding this comment.
Unfortunately, I don't have enough context to review this. It does look a bit suspect - the whitespace_advance(prev_atom) looks like it might be happening twice?
tomcur
approved these changes
Sep 3, 2026
Signed-off-by: Nico Burns <nico@nicoburns.com>
Co-authored-by: Daniel McNab <36049421+DJMcNab@users.noreply.github.com>
nicoburns
force-pushed
the
devin/1786652166-inline-box-after-newline-content-width
branch
from
September 3, 2026 13:20
b2e94d9 to
9f725ed
Compare
Signed-off-by: Nico Burns <nico@nicoburns.com>
Collaborator
Author
nicoburns
enabled auto-merge
September 3, 2026 13:22
tomcur
added a commit
to tomcur/parley
that referenced
this pull request
Sep 5, 2026
<!-- Please ensure that you have reviewed our LLM ("AI") policy at
https://linebender.org/wiki/llm-policy/.
If you did not use any LLM tools, please replace `Unspecified` with
`None`. -->
LLM Contributions: review.
Quick follow-up to linebender#746, giving the same treatment to `min_width` as
linebender#746 did to the `max_width`. So, if there's an inline box immediately
following a newline, that box's width is now correctly assigned to the
new line's `min_width`.
(Separately, I'm thinking about a nicer form for this function in
general, plus perhaps a good way to test it to actually catch this stuff
in CI.)
<!--
If our users need to know about this change, please describe that in the
quote block below.
What you write here will be edited by us later - it doesn't need to be
perfect.
If this change doesn't need a changelog entry, please replace the next
line with `**Changelog: None**`.
-->
**Changelog**
> ### Fixed
>
> - **Note to the editor:** this PR's entry should be merged with
linebender#746's.
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.
LLM Contributions: Bug identified and code generated with Devin Ultra.
Fix
calculate_content_widthswhen an inline boxes immediately follows a hard/explicit newline. They were previously incorrectly counted as being before the newline because the "Mandatory Break" is only set on the character following the line break. This change mirrors what the line-breaking is already doing into the content width calculation.Changelog