Fix inline width after backtracked line breaks - #2803
Conversation
Recompute split inline box width from retained children instead of using a stale cursor position. This avoids phantom trailing width when later inline content is moved to the next line. Add a regression test for right-aligned nested inline content. Co-authored-by: ChatGPT <noreply@openai.com>
|
Hi! Thanks for the pull request. I don’t like to change the line breaking algorithm, but here we remove a hack and use the same, correct way to set the line height, so… Let’s merge, and hope that we won’t introduce a regression!
Please 🙏 carefully read AI pull requests in the future, the code duplication is obvious and masks the fact that this code is actually a possible simplification… when we use a brain to think about that. The time contributors don’t spend is time spent by maintainers, and that doesn’t scale well. In case you don’t want to spend this time, an issue is often better than a pull request: maintainers know how to use AI to write code if they want to, and if they prefer to write code they definitely don’t want to spend time fixing ChatGPT’s code. (And thanks for the short comment, not the useless walls of text AI usually generates!) |
|
Thanks for the fix! I saw the duplication, but din't have enough code understanding to responsibly refactor it. Good point, sometimes it might be better to make an issue, I'll think about it the next time. |
Recompute split inline box width from retained children instead of using a stale cursor position. This avoids phantom trailing width when later inline content is moved to the next line.
Before:
test.pdf
After:
test.pdf
Co-authored-by: ChatGPT noreply@openai.com