WeasyPrint icon indicating copy to clipboard operation
WeasyPrint copied to clipboard

white-space: pre-wrap; works depending on tag position

Open galech opened this issue 2 years ago • 2 comments

Hi everyone,

depending on space before or after tag (</b> domicilié, </b>domicilié) white-space: pre-wrap can fail

image

<style style="text/css">


@page {
	size: A4 ;
	margin-left: 18px;
	margin-right: 18px;
	margin-bottom: 100px;
	margin-top: 50px;

}

pre {
	white-space: pre-wrap;
	border: 2px solid black;
	background: inherit;
	font-family: inherit;
	font-size: inherit;
}

</style>


<body>
	<div style="font-size:13px">
		<div>
			<pre>Cher Confrère,<br><br>Je vous informe de la prise en charge en HAD de <b>hhhhhhh 11111111 (né(e) CLAIRE), né le 2 déc. 2022, </b>domicilié fsdfsdfsdfsdfds </pre>
			<pre>Cher Confrère,<br><br>Je vous informe de la prise en charge en HAD de <b>hhhhhhh 11111111 (né(e) CLAIRE), né le 2 déc. 2022,</b> domicilié fsdfsdfsdfsdfds </pre>
		</div>
	</div>
</body>

Thank you for your great job

galech avatar Dec 22 '23 12:12 galech

Thanks for the bug report.

That’s strange, we have so many tests to check that this couldn’t happen! We probably need one more…

liZe avatar Jan 26 '24 14:01 liZe