The only way I know to copy multi lines of code into the chat is to copy one line by one line and for each line inserting a ` at the start and at the end.
I have searched informations all over the site but was not successfull.
Simply paste the code by itself into the comment box.
you should see a new button appear to the right: fixed font
-- click that and it should format your comment as code.
Tested with Chrome/Windows
(informations coming from the chat, Mr.Wizard)
I suggest to play with this feature in the sandbox chatroom : it works too.