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

white-space: pre-wrap wraps spans prematurely #2308

Open
nnsee opened this issue Nov 22, 2024 · 1 comment
Open

white-space: pre-wrap wraps spans prematurely #2308

nnsee opened this issue Nov 22, 2024 · 1 comment
Labels
bug Existing features not working as expected

Comments

@nnsee
Copy link

nnsee commented Nov 22, 2024

Hi there! Spans seem to be wrapped to a new line in their entirety when white-space: pre-wrap is set.

Repro code:

<style>
.highlight {
  background-color: #ffff00;
}
code {
  white-space: pre-wrap;
  display: block;
  max-width: 250px;
}
</style>
<code>
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
</code>
<hr>
<code>
00 00 00 00 00 00 00 00 00 00 <span class="highlight">00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00</span> 00 00 00 00 00
</code>

WeasyPrint output:

Image

Expected output:

Image

Not quite sure why this is happening or how to stop it from happening.

@liZe liZe added the bug Existing features not working as expected label Nov 24, 2024
@liZe
Copy link
Member

liZe commented Nov 24, 2024

Thanks for the report. That’s probably related to #2025.

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