Is this (only/mostly) an issue on the “users” category (which I have muted)? I don’t see the same problem anywhere else…
It seems to me like it’s a subset of the general problem of “people don’t know how to / aren’t willing to take the time to format their messages properly” - possibly combined with a little bit of not knowing Markdown (although the toolbar should limit the impact of the latter).
I’m not sure about that… GitHub has a toolbar in the comment text box, yet we see issues filed without using code blocks all the time. I think most people neither know that’s a thing, nor care enough to ask when the format obviously looks wrong after submission.
Is it possible to make custom bots? If so, maybe we could create a bot that sends a private message to a user if they post what looks like code without formatting it.
A potentially perfect solution: Someone over at Discourse has developed a Code in Post Detector. It pops up a message saying “It looks like your post may contain formatted code” and gives the markdown for block code. The message content can presumably be customized.
The announcement contains links to its GitHub repo and some installation instruction. The most recent GitHub repo activity was last month, the March 2019 thread announcing the plug-in was active up to this past January 2022. The plug-in is endorsed/sponsored by Sam Saffron, a Discourse co-founder.