If I use the code macro the frame around it does not show up and everything is formatted in Fixed-width font. It has nothig to do with the expanding text. If it is expandes it is still like this. I have mor than one code makro on the page and the first one is formatted properly.
(Confluence 5.6.6)
This is how is looks like:

This is how it should look like:
