Lxc/lxd profile formatting smashed

So, I was working on a profile to install something automatically via cloud init. It was nicely formatted with new lines for various bits of runcmd and on all that. On one iteration though, lxc (or admittedly something) suddenly decided to smash the formatting and ignore all the new lines. So, instead of things being on newlines, suddenly I’ve got \n everywhere and most things in the user.user-data section all crammed together in an unreadable mess. Is this expected? Has anyone else seen this kind of behavior?