thanks very much guys!
I tried it and it seems to work. Like osayidan says, I think I need to edit the css cos the wider font used in the code box seems to misalign it quite a bit, though the multiple spaces are appearing now. hurray!
*edit:
can I ask where I can edit the CSS to change the fonts for the <code> bbcode? I tried searching through AdminCP -> Styles and Templates but didn't seem to find anything that defines it for the bbcodes. Is there somewhere else I should be looking?