This is incorrect – we don’t want preformatted text to be syntax highlighted by default.
If are posting code, use a code fence.
This should be behind a site setting at a bare minimum – most communities do not care about source code at all, but will find uses for fixed-width font areas…