You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The content in <pre> should be formatted the same way both times.
import{Trans}from"@lingui/react/macro"exportdefaultfunctionApp(){return(<><pre>
This is a test{"\n"}<strong>with a second{"\n"} and third line</strong>{"\n"}
and even a fourth one!
</pre><pre><Trans>
This is a test{"\n"}<strong>with a second{"\n"} and third line</strong>{"\n"}
and even a fourth one!
</Trans></pre></>);}
Expected behavior
Newlines are preserved in and around <tags> in translations. The update to lingui 5.0 fixed the whitespace & newline export to catalogs, but formatting is still broken.
Additional context
jsLingui version 5.1.2
The text was updated successfully, but these errors were encountered:
Description
In
@lingui/react
, newlines in translations are not preserved during formatting (rendering), when<tags>
are present.Please see this demo: https://codesandbox.io/p/devbox/infallible-cdn-y863cd
To Reproduce
The content in
<pre>
should be formatted the same way both times.Expected behavior
Newlines are preserved in and around
<tags>
in translations. The update to lingui 5.0 fixed the whitespace & newline export to catalogs, but formatting is still broken.Additional context
5.1.2
The text was updated successfully, but these errors were encountered: