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

Line breaks in between inline elements and punctuation #3363

Open
randyclassen opened this issue Jan 3, 2024 · 0 comments
Open

Line breaks in between inline elements and punctuation #3363

randyclassen opened this issue Jan 3, 2024 · 0 comments
Labels
Milestone

Comments

@randyclassen
Copy link

randyclassen commented Jan 3, 2024

When using inline elements next to punctuation, a line break can come between the element and the punctuation. Adding nobr tags, as suggested in #1036, does not work in versions 2.0.1 - 2.0.4.

Feel free to close this issue in favor of that one if that works better. It seemed like that one was solved and has since regressed.


Example html with and without nobr / white-space: nowrap;

<p style="text-indent: 30px;">
    By continuing to use the Website, you agree to be bound by these Terms and Conditions
    of Use (the "<u>Terms</u>") and the policies and materials incorporated by reference herein,
    including the then-current privacy policy (the "<u>Privacy Policy</u>") found on the Website.
</p>

<p style="text-indent: 30px;">
    By continuing to use the Website, you agree to be bound by these Terms and Conditions
    of Use (the <nobr>"<u>Terms</u>")</nobr> and the policies and materials incorporated by reference herein,
    including the then-current privacy policy (the <nobr>"<u>Privacy Policy</u>")</nobr> found on the Website.
</p>

<p style="text-indent: 30px;">
    By continuing to use the Website, you agree to be bound by these Terms and Conditions
    of Use (the <span style="white-space: nowrap;">"<u>Terms</u>")</span> and the policies and materials incorporated by reference herein,
    including the then-current privacy policy (the <span style="white-space: nowrap;">"<u>Privacy Policy</u>")</span> found on the Website.
</p>

In version 2.0.1 - 2.0.4, nobr / nowrap do not change the line break

image

In version 2.0.0 and before, nobr prevents line break but it never moves to the next line (probably resolved with #2948 / #2945)

image

Test v120-200.pdf
Test v201-204.pdf

@bsweeney bsweeney added the layout label Jan 3, 2024
@bsweeney bsweeney added this to the 3.0.1 milestone Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants