Adding formatted comments in WordPress can be surprisingly difficult.
Here are some ways to do so
Sojourn to postable.
And, enter the text you want formatted and click the “make it friendly” button.
Text HTML Encoded
Crediting Chris Coyier.
He blogged about it here.
The post is titled “Posting Code Blocks on a WordPress Site“.