oop! I think I know what's up - when I made the copy/paste code I forgot to include the lj-raw tag in the textbox, so what's happening is that without that override, IJ is putting in the line breaks for you.
Try putting the entire code between lj-raw and /lj-raw tags, or just click "disable auto-formatting" and see if that helps! :)