Hi there,
I believe the <pre> tag is causing the trouble.
Text in a <pre> element is displayed in a fixed-width font and it preserves both spaces and line breaks:
https://www.w3schools.com/tags/tag_pre.asp
I think a workaround would be to add the content twice, one displays on desktop only with pre tag and one displays on mobile only without the pre tag. So something like this:
<div class="hide-on-mobile">
<pre>
content here
</pre>
</div>
<div class="hide-on-desktop hide-on-tablet">
content here
</div>
Let me know if this works.