OK, I got it. This was a really stupid mistake. I had copied the shortcode from the website and when inserting it inside the single page, the pre-tag formatting was included without me noticing.
So if anybody encounters the same problem: go into page editing mode, switch from “Visual” to “Text” and make sure there are no tags around the shortcode.