The code element does not preserve whitespace and line-breaks.
To fix this, you can put the code element inside a pre element: