No worries, just add a line break by pressing enter wherever you need one. As long as the code is within the code tags, it will still be part of the code block.
What I do whenever I want to post a message with url links, code tags etc I use the preview button. That way I can see how my code will appear once I click submit.
Welcome to the Ranch, by the way. I'm sure you will enjoy your stay here.