Technically it is possible to do something here using some AI integration, but getting in fast enough would be a challenge.
Here is a somewhat old post about this:
Some more ideas would be:
https://github.com/rjnp2/Text-Recognition-using-Deep-Learning
Perhaps a super rough plugin here that “could get the job done ™” would be to automate tesseract:
Pass it the image → get text → look at total number of letters → if more than N you know it is very likely a code snippet. Then we can warn prior to posting.
I think this is reasonably feasible in a plugin.
