Yes, you’re right.
Whatever code is written, when it’s quoted (on discourse) it gets a mess.
I don’t know how to prevent that.
Better to follow the link and to look at the code i wrote in the original post.
Quite a difference.
( If there was a way to stop discourse from doing that, I would.
The best I can do is preventing discourse to expand the link at all, like this: Script to remove or reinstall snap Ubuntu 26.04 / 24.04 and maybe it would have been better if I had done that )
However, If you expand the quote by clicking on the arrow in the upper right corner of the quote, you’ll see the original in an undistorted way.