When making a comment for the first time, if you paste in code like so:
Then it does not highlight as code, see below:
But if you go back and edit it again, you'll see that it is now all one line:
and then after clicking Save Your Edits, it will display properly:
This works properly when previewing your post before asking a question.