Not an answer, but if you put code tags around your code, it retains the formatting/indentation (remove the space after the word code):

[code ]
If (bSomething) Begin
//do something
End
[/code ]

Code:
    If (bSomething) Begin
        //do something
    End