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

Text duplicated after line break at non-breaking space #1561

Closed
Greunlis opened this issue Feb 5, 2022 · 1 comment
Closed

Text duplicated after line break at non-breaking space #1561

Greunlis opened this issue Feb 5, 2022 · 1 comment
Labels
bug Existing features not working as expected
Milestone

Comments

@Greunlis
Copy link

Greunlis commented Feb 5, 2022

I just found a strange regression between versions 53.4 and 54.
When this HTML is rendered (no CSS applied)
Lorem ipsum dolor sit <b>amet</b> Somehow this part is duplicated on next line&nbsp;<b>bold</b> text.
WeasyPrint v. 54.0 ignores non-breaking space and duplicates part of the text on next line.
See test.pdf
Version 53.4 ignores the non-breaking space too, but at least doesn't duplicate the text.

When last few words are wrapped in a span, it seems fine in both versions.
Lorem ipsum dolor sit <b>amet</b> Somehow this part is duplicated on next <span>line&nbsp;<b>bold</b> text.</span>

Thanks for looking into it.

@liZe liZe added the bug Existing features not working as expected label Feb 6, 2022
@liZe
Copy link
Member

liZe commented Feb 8, 2022

Thanks for the report!

This bug has been fixed by 562a249 (the commit message has the wrong commit number 😒). Real-world tests are welcome!

@liZe liZe closed this as completed Feb 8, 2022
@liZe liZe added this to the 54.2 milestone Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Existing features not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants